Correctly registering the distributor at startup
This commit is contained in:
+3
@@ -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) {
|
||||||
|
|||||||
-3
@@ -150,9 +150,6 @@ fun SelectNotificationProvider(sharedPreferencesViewModel: SharedPreferencesView
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
val currentDistributor = PushDistributorHandler.getSavedDistributor()
|
|
||||||
PushDistributorHandler.saveDistributor(currentDistributor)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user