mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08: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
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
|
return@launch
|
||||||
}
|
}
|
||||||
|
|
||||||
// By default, use internal solution (fcm/background sync)
|
|
||||||
UnifiedPush.saveDistributor(context, context.packageName)
|
|
||||||
val distributors = UnifiedPush.getDistributors(context)
|
val distributors = UnifiedPush.getDistributors(context)
|
||||||
|
|
||||||
if (distributors.size == 1 && !force) {
|
if (distributors.size == 1 && !force) {
|
||||||
@ -101,7 +99,14 @@ class UnifiedPushHelper @Inject constructor(
|
|||||||
UnifiedPush.registerApp(context)
|
UnifiedPush.registerApp(context)
|
||||||
onDoneRunnable?.run()
|
onDoneRunnable?.run()
|
||||||
} else {
|
} 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()
|
onDoneRunnable?.run()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.setOnCancelListener {
|
||||||
|
// By default, use internal solution (fcm/background sync)
|
||||||
|
UnifiedPush.saveDistributor(context, context.packageName)
|
||||||
|
UnifiedPush.registerApp(context)
|
||||||
|
onDoneRunnable?.run()
|
||||||
|
}
|
||||||
.setCancelable(cancellable)
|
.setCancelable(cancellable)
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user