mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
fix: revert simplified sendSingleThreadNotification that wasn't bundling properly, add mentions properly resolving by adding cache call
This commit is contained in:
parent
0ed7b28b6b
commit
2a2d97be4c
@ -49,6 +49,7 @@ import org.session.libsignal.utilities.Util;
|
|||||||
import org.thoughtcrime.securesms.ApplicationContext;
|
import org.thoughtcrime.securesms.ApplicationContext;
|
||||||
import org.thoughtcrime.securesms.contactshare.ContactUtil;
|
import org.thoughtcrime.securesms.contactshare.ContactUtil;
|
||||||
import org.thoughtcrime.securesms.conversation.v2.ConversationActivityV2;
|
import org.thoughtcrime.securesms.conversation.v2.ConversationActivityV2;
|
||||||
|
import org.thoughtcrime.securesms.conversation.v2.utilities.MentionManagerUtilities;
|
||||||
import org.thoughtcrime.securesms.conversation.v2.utilities.MentionUtilities;
|
import org.thoughtcrime.securesms.conversation.v2.utilities.MentionUtilities;
|
||||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||||
import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo;
|
import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo;
|
||||||
@ -273,9 +274,13 @@ public class DefaultMessageNotifier implements MessageNotifier {
|
|||||||
lastAudibleNotification = System.currentTimeMillis();
|
lastAudibleNotification = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean hasMultipleThreads = notificationState.hasMultipleThreads();
|
if (notificationState.hasMultipleThreads()) {
|
||||||
for (long threadId : notificationState.getThreads()) {
|
for (long threadId : notificationState.getThreads()) {
|
||||||
sendSingleThreadNotification(context, new NotificationState(notificationState.getNotificationsForThread(threadId)), signal, hasMultipleThreads);
|
sendSingleThreadNotification(context, new NotificationState(notificationState.getNotificationsForThread(threadId)), false, true);
|
||||||
|
}
|
||||||
|
sendMultipleThreadNotification(context, notificationState, signal);
|
||||||
|
} else if (notificationState.getMessageCount() > 0){
|
||||||
|
sendSingleThreadNotification(context, notificationState, signal, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
cancelOrphanedNotifications(context, notificationState);
|
cancelOrphanedNotifications(context, notificationState);
|
||||||
@ -323,6 +328,7 @@ public class DefaultMessageNotifier implements MessageNotifier {
|
|||||||
|
|
||||||
builder.setThread(notifications.get(0).getRecipient());
|
builder.setThread(notifications.get(0).getRecipient());
|
||||||
builder.setMessageCount(notificationState.getMessageCount());
|
builder.setMessageCount(notificationState.getMessageCount());
|
||||||
|
MentionManagerUtilities.INSTANCE.populateUserPublicKeyCacheIfNeeded(notifications.get(0).getThreadId(),context);
|
||||||
builder.setPrimaryMessageBody(recipient, notifications.get(0).getIndividualRecipient(),
|
builder.setPrimaryMessageBody(recipient, notifications.get(0).getIndividualRecipient(),
|
||||||
MentionUtilities.highlightMentions(notifications.get(0).getText(), context),
|
MentionUtilities.highlightMentions(notifications.get(0).getText(), context),
|
||||||
notifications.get(0).getSlideDeck());
|
notifications.get(0).getSlideDeck());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user