Fixed notification title for when there are more than 5 messages
This commit is contained in:
parent
2c41aff3af
commit
18d72d727c
@ -92,14 +92,12 @@ public class NewMessageNotification extends AbstractNotification {
|
|||||||
numberOfUnacknowledgedMessages) {
|
numberOfUnacknowledgedMessages) {
|
||||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx);
|
NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx);
|
||||||
builder.setSmallIcon(R.drawable.ic_notification_new_message)
|
builder.setSmallIcon(R.drawable.ic_notification_new_message)
|
||||||
.setContentTitle(ctx.getString(R.string.n_new_messages, unacknowledged.size()))
|
.setContentTitle(ctx.getString(R.string.n_new_messages, numberOfUnacknowledgedMessages))
|
||||||
.setContentText(ctx.getString(R.string.app_name));
|
.setContentText(ctx.getString(R.string.app_name));
|
||||||
|
|
||||||
NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();
|
NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();
|
||||||
//noinspection SynchronizationOnLocalVariableOrMethodParameter
|
//noinspection SynchronizationOnLocalVariableOrMethodParameter
|
||||||
synchronized (unacknowledged) {
|
synchronized (unacknowledged) {
|
||||||
inboxStyle.setBigContentTitle(ctx.getString(R.string.n_new_messages,
|
|
||||||
numberOfUnacknowledgedMessages));
|
|
||||||
for (Plaintext msg : unacknowledged) {
|
for (Plaintext msg : unacknowledged) {
|
||||||
Spannable sb = new SpannableString(msg.getFrom() + " " + msg.getSubject());
|
Spannable sb = new SpannableString(msg.getFrom() + " " + msg.getSubject());
|
||||||
sb.setSpan(SPAN_EMPHASIS, 0, String.valueOf(msg.getFrom()).length(), Spannable
|
sb.setSpan(SPAN_EMPHASIS, 0, String.valueOf(msg.getFrom()).length(), Spannable
|
||||||
|
Loading…
Reference in New Issue
Block a user