mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-26 03:46:45 +00:00
Harden notification channels.
There's odd corner cases where channels can be duplicated. This commit adds some hard checks where we trim any dead channels, and unset any notification channels from recipients whose notification channel isn't present in the system settings.
This commit is contained in:
@@ -282,6 +282,7 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
||||
RecipientDatabase db = DatabaseFactory.getRecipientDatabase(getContext());
|
||||
db.setMessageRingtone(recipient, NotificationChannels.getMessageRingtone(context, recipient));
|
||||
db.setMessageVibrate(recipient, NotificationChannels.getMessageVibrate(context, recipient) ? VibrateState.ENABLED : VibrateState.DISABLED);
|
||||
NotificationChannels.ensureCustomChannelConsistency(context);
|
||||
return null;
|
||||
}
|
||||
}.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);
|
||||
|
||||
Reference in New Issue
Block a user