From 16faf41a84bd7a1a20346c6b0d9039da0df515fd Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Wed, 21 Feb 2024 15:29:17 -0500 Subject: [PATCH] Fix profile name not updating correctly. --- .../org/thoughtcrime/securesms/database/RecipientTable.kt | 3 ++- .../org/thoughtcrime/securesms/jobs/RetrieveProfileJob.kt | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/RecipientTable.kt b/app/src/main/java/org/thoughtcrime/securesms/database/RecipientTable.kt index 9158a5f5e8..a9cb71615c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/RecipientTable.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/RecipientTable.kt @@ -4112,7 +4112,8 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da PROFILE_FAMILY_NAME to null, PROFILE_JOINED_NAME to null, LAST_PROFILE_FETCH to 0, - PROFILE_AVATAR to null + PROFILE_AVATAR to null, + PROFILE_SHARING to 0 ) .run { if (recipientId == null) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileJob.kt b/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileJob.kt index 7e25d10e93..8de40d2c0b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileJob.kt @@ -384,9 +384,12 @@ class RetrieveProfileJob private constructor(parameters: Parameters, private val } if (writeChangeEvent || localDisplayName.isEmpty()) { + ApplicationDependencies.getDatabaseObserver().notifyConversationListListeners() val threadId = SignalDatabase.threads.getThreadIdFor(recipient.id) if (threadId != null) { - ApplicationDependencies.getMessageNotifier().updateNotification(context, forConversation(threadId)) + SignalDatabase.runPostSuccessfulTransaction { + ApplicationDependencies.getMessageNotifier().updateNotification(context, forConversation(threadId)) + } } }