Only notify for unauthorized response to messages endpoint.

This commit is contained in:
Nicholas
2023-01-04 11:32:43 -05:00
committed by Greyson Parrelli
parent 0fd8f73cca
commit d70fe8f2cd
4 changed files with 11 additions and 31 deletions

View File

@@ -454,15 +454,15 @@ public class TextSecurePreferences {
if (previous != value) {
Recipient.self().live().refresh();
if (value) {
notifyUnregisteredReceived(context);
}
}
if (value) {
clearLocalCredentials(context);
}
if (value && !previous) {
showUnregisteredNotification(context);
EventBus.getDefault().post(new ReminderUpdateEvent());
} else {
NotificationManagerCompat.from(context).cancel(NotificationIds.UNREGISTERED_NOTIFICATION_ID);
}
}
@@ -1168,7 +1168,7 @@ public class TextSecurePreferences {
return preferences;
}
private static void showUnregisteredNotification(Context context) {
private static void notifyUnregisteredReceived(Context context) {
PendingIntent reRegistrationIntent = PendingIntent.getActivity(context,
0,
RegistrationNavigationActivity.newIntentForReRegistration(context),