mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 10:55:55 +03:00
Merge pull request #6890 from vector-im/feature/adm/missing-notifications-on-login
Missing push notifications on login
This commit is contained in:
commit
7211c9c08e
2 changed files with 15 additions and 3 deletions
1
changelog.d/6891.bugfix
Normal file
1
changelog.d/6891.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fixes missing firebase notifications after logging in when UnifiedPush distributor is installed
|
|
@ -92,8 +92,6 @@ class UnifiedPushHelper @Inject constructor(
|
|||
return@launch
|
||||
}
|
||||
|
||||
// By default, use internal solution (fcm/background sync)
|
||||
UnifiedPush.saveDistributor(context, context.packageName)
|
||||
val distributors = UnifiedPush.getDistributors(context)
|
||||
|
||||
if (distributors.size == 1 && !force) {
|
||||
|
@ -101,7 +99,14 @@ class UnifiedPushHelper @Inject constructor(
|
|||
UnifiedPush.registerApp(context)
|
||||
onDoneRunnable?.run()
|
||||
} else {
|
||||
openDistributorDialogInternal(activity, pushersManager, onDoneRunnable, distributors, !force, !force)
|
||||
openDistributorDialogInternal(
|
||||
activity = activity,
|
||||
pushersManager = pushersManager,
|
||||
onDoneRunnable = onDoneRunnable,
|
||||
distributors = distributors,
|
||||
unregisterFirst = force,
|
||||
cancellable = !force
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -165,6 +170,12 @@ class UnifiedPushHelper @Inject constructor(
|
|||
onDoneRunnable?.run()
|
||||
}
|
||||
}
|
||||
.setOnCancelListener {
|
||||
// By default, use internal solution (fcm/background sync)
|
||||
UnifiedPush.saveDistributor(context, context.packageName)
|
||||
UnifiedPush.registerApp(context)
|
||||
onDoneRunnable?.run()
|
||||
}
|
||||
.setCancelable(cancellable)
|
||||
.show()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue