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.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.text.Html
|
import android.text.SpannableStringBuilder
|
||||||
|
import android.text.style.ForegroundColorSpan
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.core.app.NotificationCompat
|
import androidx.core.app.NotificationCompat
|
||||||
@ -125,13 +126,11 @@ class DirectReplyReceiver : BroadcastReceiver() {
|
|||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.N)
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
private fun informReplyFailed() {
|
private fun informReplyFailed() {
|
||||||
val errorMessage =
|
val errorColor = ForegroundColorSpan(context.resources.getColor(R.color.medium_emphasis_text, context.theme))
|
||||||
Html.fromHtml(
|
val errorMessageHeader = context.resources.getString(R.string.nc_message_failed_to_send)
|
||||||
"<font color='red'><em>" +
|
val errorMessage = SpannableStringBuilder()
|
||||||
context.resources.getString(R.string.nc_message_failed_to_send) +
|
.append("$errorMessageHeader\n$replyMessage", errorColor, 0)
|
||||||
"</em></font>",
|
// .append("\n$replyMessage")
|
||||||
Html.FROM_HTML_MODE_COMPACT
|
|
||||||
)
|
|
||||||
appendMessageToNotification(errorMessage)
|
appendMessageToNotification(errorMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@
|
|||||||
<string name="nc_formatted_message_you">You: %1$s</string>
|
<string name="nc_formatted_message_you">You: %1$s</string>
|
||||||
<string name="nc_message_read">Message read</string>
|
<string name="nc_message_read">Message read</string>
|
||||||
<string name="nc_message_sent">Message sent</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_remote_audio_off">Remote audio off</string>
|
||||||
<string name="nc_add_attachment">Add attachment</string>
|
<string name="nc_add_attachment">Add attachment</string>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user