MigrationReceiver: Fix the folly!

This commit is contained in:
Rahul Patel
2024-09-29 20:16:42 +05:30
parent 124aa9bd55
commit 7fc74dbf03
2 changed files with 7 additions and 4 deletions

View File

@@ -57,7 +57,9 @@ class MigrationReceiver : BroadcastReceiver() {
if (CertUtil.isAppGalleryApp(context, context.packageName)) {
val dispensers = Preferences.getStringSet(context, PREFERENCE_DISPENSER_URLS)
.toMutableSet()
.remove(Constants.URL_DISPENSER)
dispensers.remove(Constants.URL_DISPENSER)
context.save(PREFERENCE_DISPENSER_URLS, dispensers)
}
currentVersion++

View File

@@ -82,9 +82,10 @@ class SplashFragment : BaseFragment<FragmentSplashBinding>() {
attachActions()
// Show anonymous logins if we have dispenser URL
if (!viewModel.authProvider.dispenserURL.isNullOrBlank()) {
binding.btnAnonymous.visibility = View.VISIBLE
}
binding.btnAnonymous.visibility = if (viewModel.authProvider.dispenserURL.isNullOrBlank())
View.GONE
else
View.VISIBLE
viewLifecycleOwner.lifecycleScope.launch {
viewModel.authState.collectLatest {