Correctly registering the distributor at startup

This commit is contained in:
Vitor Pamplona
2024-08-27 17:38:14 -04:00
parent 1a9d91cdc0
commit 52f33d79e0
2 changed files with 3 additions and 3 deletions

View File

@@ -34,6 +34,9 @@ object PushNotificationUtils {
}
try {
if (pushHandler.savedDistributorExists()) {
val currentDistributor = PushDistributorHandler.getSavedDistributor()
PushDistributorHandler.saveDistributor(currentDistributor)
RegisterAccounts(accounts).go(pushHandler.getSavedEndpoint())
}
} catch (e: Exception) {

View File

@@ -150,9 +150,6 @@ fun SelectNotificationProvider(sharedPreferencesViewModel: SharedPreferencesView
)
}
}
} else {
val currentDistributor = PushDistributorHandler.getSavedDistributor()
PushDistributorHandler.saveDistributor(currentDistributor)
}
}
}