Fix early get self crash when cycling KCS.

This commit is contained in:
Cody Henthorne
2025-01-24 15:25:47 -05:00
committed by Greyson Parrelli
parent fa692690a2
commit db9ae1c85b
2 changed files with 14 additions and 17 deletions

View File

@@ -125,6 +125,11 @@ class DefaultMessageNotifier(context: Application) : MessageNotifier {
) {
NotificationChannels.getInstance().ensureCustomChannelConsistency()
if (!Recipient.isSelfSet) {
Log.w(TAG, "Attempting to update notifications without local self, aborting")
return
}
val currentLockStatus: Boolean = KeyCachingService.isLocked(context)
val currentPrivacyPreference: NotificationPrivacyPreference = SignalStore.settings.messageNotificationsPrivacy
val notificationConfigurationChanged: Boolean = currentLockStatus != previousLockedStatus || currentPrivacyPreference != previousPrivacyPreference