mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
Fix message overflow.
This commit is contained in:
parent
6f7ec3e401
commit
d9cc0446b6
@ -217,7 +217,7 @@ public class MessagingController implements Runnable {
|
||||
@Override
|
||||
public boolean add(Message m) {
|
||||
while (size() >= MAX_MESSAGES) {
|
||||
Message dropped = super.remove();
|
||||
Message dropped = super.removeLast();
|
||||
droppedMessages.add(0, dropped.makeMessageReference());
|
||||
}
|
||||
super.add(0, m);
|
||||
@ -4611,7 +4611,7 @@ public class MessagingController implements Runnable {
|
||||
keyguardService.inKeyguardRestrictedInputMode()) ||
|
||||
(K9.getNotificationHideSubject() == NotificationHideSubject.ALWAYS) ||
|
||||
summary.length() == 0) {
|
||||
summary = new StringBuilder(context.getString(R.string.notification_new_title));
|
||||
summary = context.getString(R.string.notification_new_title);
|
||||
}
|
||||
|
||||
NotificationManager notifMgr =
|
||||
@ -4645,10 +4645,10 @@ public class MessagingController implements Runnable {
|
||||
getMessageSubject(context, m)));
|
||||
}
|
||||
if (!data.droppedMessages.isEmpty()) {
|
||||
style.setSummaryText(context.getString(
|
||||
R.string.notification_additional_messages, data.droppedMessages.size()));
|
||||
style.setSummaryText(context.getString(R.string.notification_additional_messages,
|
||||
data.droppedMessages.size(), accountDescr));
|
||||
}
|
||||
String title = context.getString(R.string.notification_new_messages_title, newMessages, accountDescr);
|
||||
String title = context.getString(R.string.notification_new_messages_title, newMessages);
|
||||
style.setBigContentTitle(title);
|
||||
builder.setContentTitle(title);
|
||||
builder.setSubText(accountDescr);
|
||||
|
Loading…
Reference in New Issue
Block a user