mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 02:55:23 +00:00
Fix notification display order.
Messages in notifications were showing in reverse order, that is newest on top instead of newest at the bottom making multiple messages hard to read. Closes #1984
This commit is contained in:
parent
32153ec379
commit
9ef1ea283b
@ -53,6 +53,7 @@ import org.whispersystems.textsecure.api.messages.TextSecureEnvelope;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
/**
|
||||
* Handles posting system notifications for new messages.
|
||||
@ -180,7 +181,9 @@ public class MessageNotifier {
|
||||
|
||||
SpannableStringBuilder content = new SpannableStringBuilder();
|
||||
|
||||
for (NotificationItem item : notifications) {
|
||||
ListIterator<NotificationItem> iterator = notifications.listIterator(notifications.size());
|
||||
while(iterator.hasPrevious()) {
|
||||
NotificationItem item = iterator.previous();
|
||||
content.append(item.getBigStyleSummary());
|
||||
content.append('\n');
|
||||
}
|
||||
@ -224,7 +227,9 @@ public class MessageNotifier {
|
||||
|
||||
InboxStyle style = new InboxStyle();
|
||||
|
||||
for (NotificationItem item : notifications) {
|
||||
ListIterator<NotificationItem> iterator = notifications.listIterator(notifications.size());
|
||||
while(iterator.hasPrevious()) {
|
||||
NotificationItem item = iterator.previous();
|
||||
style.addLine(item.getTickerText());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user