From 3e0143811b868db407a041ac271de6baf909d53f Mon Sep 17 00:00:00 2001 From: Sayantan Roychowdhury Date: Mon, 9 Jan 2023 16:19:59 +0530 Subject: [PATCH] clear updates data if sources are changed --- .../main/java/foundation/e/apps/settings/SettingsFragment.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/foundation/e/apps/settings/SettingsFragment.kt b/app/src/main/java/foundation/e/apps/settings/SettingsFragment.kt index b6e5da083..f6ed13a07 100644 --- a/app/src/main/java/foundation/e/apps/settings/SettingsFragment.kt +++ b/app/src/main/java/foundation/e/apps/settings/SettingsFragment.kt @@ -39,6 +39,7 @@ import foundation.e.apps.BuildConfig import foundation.e.apps.MainActivity import foundation.e.apps.MainActivityViewModel import foundation.e.apps.R +import foundation.e.apps.api.fused.UpdatesDao import foundation.e.apps.databinding.CustomPreferenceBinding import foundation.e.apps.login.LoginViewModel import foundation.e.apps.updates.manager.UpdatesWorkManager @@ -239,6 +240,7 @@ class SettingsFragment : PreferenceFragmentCompat() { override fun onDestroyView() { if (sourcesChangedFlag) { + UpdatesDao.addItemsForUpdate(emptyList()) loginViewModel.startLoginFlow() } super.onDestroyView() -- GitLab