mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Implemented suggested design changes - first attempt
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
This commit is contained in:
parent
cee5564f39
commit
fcf2118008
@ -26,7 +26,8 @@ import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.text.Html
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.util.Log
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.app.NotificationCompat
|
||||
@ -125,13 +126,11 @@ class DirectReplyReceiver : BroadcastReceiver() {
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
private fun informReplyFailed() {
|
||||
val errorMessage =
|
||||
Html.fromHtml(
|
||||
"<font color='red'><em>" +
|
||||
context.resources.getString(R.string.nc_message_failed_to_send) +
|
||||
"</em></font>",
|
||||
Html.FROM_HTML_MODE_COMPACT
|
||||
)
|
||||
val errorColor = ForegroundColorSpan(context.resources.getColor(R.color.medium_emphasis_text, context.theme))
|
||||
val errorMessageHeader = context.resources.getString(R.string.nc_message_failed_to_send)
|
||||
val errorMessage = SpannableStringBuilder()
|
||||
.append("$errorMessageHeader\n$replyMessage", errorColor, 0)
|
||||
// .append("\n$replyMessage")
|
||||
appendMessageToNotification(errorMessage)
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@
|
||||
<string name="nc_formatted_message_you">You: %1$s</string>
|
||||
<string name="nc_message_read">Message read</string>
|
||||
<string name="nc_message_sent">Message sent</string>
|
||||
<string name="nc_message_failed_to_send">Failed to send message</string>
|
||||
<string name="nc_message_failed_to_send">Failed to send message:</string>
|
||||
<string name="nc_remote_audio_off">Remote audio off</string>
|
||||
<string name="nc_add_attachment">Add attachment</string>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user