diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-07-16 22:22:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-16 22:22:25 +0200 |
commit | 196ff13442b2670dd6c557c4772be7017ee87d50 (patch) | |
tree | ee20a6e3c4a496ee9a399d27cf7e1b10abd9f900 | |
parent | 019e3574c4a578cc8973b2ec2aea516f4869f299 (diff) | |
download | AntennaPod-196ff13442b2670dd6c557c4772be7017ee87d50.zip |
Upgrade preferences before using them (#6546)
3 files changed, 2 insertions, 4 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java index bd93e3ea9..28b47c570 100644 --- a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java +++ b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java @@ -17,6 +17,7 @@ import de.danoeh.antennapod.core.ClientConfig; import de.danoeh.antennapod.core.ClientConfigurator; import de.danoeh.antennapod.error.CrashReportWriter; import de.danoeh.antennapod.error.RxJavaErrorHandlerSetup; +import de.danoeh.antennapod.preferences.PreferenceUpgrader; import de.danoeh.antennapod.spa.SPAUtil; import org.greenrobot.eventbus.EventBus; @@ -52,6 +53,7 @@ public class PodcastApp extends Application { singleton = this; ClientConfigurator.initialize(this); + PreferenceUpgrader.checkUpgrades(this); Iconify.with(new FontAwesomeModule()); Iconify.with(new MaterialModule()); diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index d8e21e8c9..b66edc884 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -58,7 +58,6 @@ import de.danoeh.antennapod.fragment.TransitionEffect; import de.danoeh.antennapod.model.download.DownloadStatus; import de.danoeh.antennapod.net.download.serviceinterface.DownloadServiceInterface; import de.danoeh.antennapod.playback.cast.CastEnabledActivity; -import de.danoeh.antennapod.preferences.PreferenceUpgrader; import de.danoeh.antennapod.storage.preferences.UserPreferences; import de.danoeh.antennapod.ui.appstartintent.MainActivityStarter; import de.danoeh.antennapod.ui.common.ThemeUtils; @@ -160,7 +159,6 @@ public class MainActivity extends CastEnabledActivity { transaction.commit(); checkFirstLaunch(); - PreferenceUpgrader.checkUpgrades(this); View bottomSheet = findViewById(R.id.audioplayerFragment); sheetBehavior = (LockableBottomSheetBehavior) BottomSheetBehavior.from(bottomSheet); sheetBehavior.setHideable(false); diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java index 0a1b56e25..275e9a279 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java @@ -13,7 +13,6 @@ import de.danoeh.antennapod.core.preferences.SleepTimerPreferences; import de.danoeh.antennapod.error.CrashReportWriter; import de.danoeh.antennapod.storage.preferences.UserPreferences; import de.danoeh.antennapod.storage.preferences.UserPreferences.EnqueueLocation; -import de.danoeh.antennapod.core.util.download.FeedUpdateManager; import de.danoeh.antennapod.fragment.QueueFragment; import de.danoeh.antennapod.fragment.swipeactions.SwipeAction; import de.danoeh.antennapod.fragment.swipeactions.SwipeActions; @@ -31,7 +30,6 @@ public class PreferenceUpgrader { int newVersion = BuildConfig.VERSION_CODE; if (oldVersion != newVersion) { - FeedUpdateManager.restartUpdateAlarm(context, true); CrashReportWriter.getFile().delete(); upgrade(oldVersion, context); |