mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-20 11:15:02 +01:00
refactor check if token should be registered
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
1bd28f5ef4
commit
b339aa9d33
@ -245,9 +245,12 @@ public class PushUtils {
|
|||||||
accountPushData = null;
|
accountPushData = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((TextUtils.isEmpty(providerValue) || accountPushData == null)
|
boolean userHasNoPushData = (TextUtils.isEmpty(providerValue) || accountPushData == null);
|
||||||
&& !userEntity.getScheduledForDeletion()) ||
|
boolean userIsNotMarkedForDeletion = !userEntity.getScheduledForDeletion();
|
||||||
(accountPushData != null && !accountPushData.getPushToken().equals(token) && !userEntity.getScheduledForDeletion())) {
|
boolean tokenHasChanged =
|
||||||
|
accountPushData != null && !accountPushData.getPushToken().equals(token);
|
||||||
|
|
||||||
|
if (userIsNotMarkedForDeletion && (userHasNoPushData || tokenHasChanged)) {
|
||||||
|
|
||||||
Map<String, String> nextcloudRegisterPushMap = new HashMap<>();
|
Map<String, String> nextcloudRegisterPushMap = new HashMap<>();
|
||||||
nextcloudRegisterPushMap.put("format", "json");
|
nextcloudRegisterPushMap.put("format", "json");
|
||||||
|
Loading…
Reference in New Issue
Block a user