Option to auto check for extension updates (#2680)

* Option to auto check for extension updates

* Addressing comments

* Added foreground check for extensions

* Added Extension Preference widget
This commit is contained in:
Jays2Kings
2020-03-20 19:22:39 -07:00
committed by GitHub
parent fd4876be24
commit 9585f9a1a6
16 changed files with 308 additions and 10 deletions
@@ -107,6 +107,8 @@ object PreferenceKeys {
const val automaticUpdates = "automatic_updates"
const val automaticExtUpdates = "automatic_ext_updates"
const val startScreen = "start_screen"
const val useBiometricLock = "use_biometric_lock"
@@ -190,6 +190,12 @@ class PreferencesHelper(val context: Context) {
fun automaticUpdates() = prefs.getBoolean(Keys.automaticUpdates, true)
fun automaticExtUpdates() = rxPrefs.getBoolean(Keys.automaticExtUpdates, false)
fun extensionUpdatesCount() = rxPrefs.getInteger("ext_updates_count", 0)
fun lastExtCheck() = rxPrefs.getLong("last_ext_check", 0)
fun hiddenCatalogues() = rxPrefs.getStringSet("hidden_catalogues", emptySet())
fun downloadNew() = rxPrefs.getBoolean(Keys.downloadNew, false)