Change-Id: I7a4827e45ecdab9ad1d80dc2826481a2ebb91b44
This commit is contained in:
S1m 2021-10-05 07:27:56 +02:00 committed by SpiritCroc
parent c6c5b123d6
commit 0b283bda56
2 changed files with 6 additions and 2 deletions

View File

@ -115,7 +115,11 @@ object UPHelper {
} }
1 -> { 1 -> {
if (forceShowSelection) { if (forceShowSelection) {
Toast.makeText(context.applicationContext, context.getString(R.string.toast_unifiedpush_one_push_distributor, distributors.first()), Toast.LENGTH_LONG).show() Toast.makeText(
context.applicationContext,
context.getString(R.string.toast_unifiedpush_one_push_distributor, distributors.first()),
Toast.LENGTH_LONG
).show()
} }
up.saveDistributor(context, distributors.first()) up.saveDistributor(context, distributors.first())
up.registerApp(context) up.registerApp(context)

View File

@ -135,7 +135,7 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor(
updateEnabledForDevice(false) updateEnabledForDevice(false)
UPHelper.registerUnifiedPush(requireContext(), forceShowSelection = true) { UPHelper.registerUnifiedPush(requireContext(), forceShowSelection = true) {
updateEnabledForDevice(true) updateEnabledForDevice(true)
Handler(Looper.getMainLooper()).postDelayed({ refreshBackgroundSyncPrefs() } , 500) Handler(Looper.getMainLooper()).postDelayed({ refreshBackgroundSyncPrefs() }, 500)
} }
true true
} }