mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 13:17:48 +02:00
Correctly registering the distributor at startup
This commit is contained in:
@@ -34,6 +34,9 @@ object PushNotificationUtils {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (pushHandler.savedDistributorExists()) {
|
if (pushHandler.savedDistributorExists()) {
|
||||||
|
val currentDistributor = PushDistributorHandler.getSavedDistributor()
|
||||||
|
PushDistributorHandler.saveDistributor(currentDistributor)
|
||||||
|
|
||||||
RegisterAccounts(accounts).go(pushHandler.getSavedEndpoint())
|
RegisterAccounts(accounts).go(pushHandler.getSavedEndpoint())
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@@ -150,9 +150,6 @@ fun SelectNotificationProvider(sharedPreferencesViewModel: SharedPreferencesView
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
val currentDistributor = PushDistributorHandler.getSavedDistributor()
|
|
||||||
PushDistributorHandler.saveDistributor(currentDistributor)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user