mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-24 16:41:28 +00:00
Unregister the user from FCM when they clear their data
This commit is contained in:
parent
e1d17ae831
commit
322087b83d
@ -570,6 +570,10 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void clearData() {
|
public void clearData() {
|
||||||
|
String token = TextSecurePreferences.getFCMToken(this);
|
||||||
|
if (token != null && !token.isEmpty()) {
|
||||||
|
LokiPushNotificationManager.unregister(token, this);
|
||||||
|
}
|
||||||
boolean wasUnlinked = TextSecurePreferences.getWasUnlinked(this);
|
boolean wasUnlinked = TextSecurePreferences.getWasUnlinked(this);
|
||||||
TextSecurePreferences.clearAll(this);
|
TextSecurePreferences.clearAll(this);
|
||||||
TextSecurePreferences.setWasUnlinked(this, wasUnlinked);
|
TextSecurePreferences.setWasUnlinked(this, wasUnlinked);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user