Make library update error notification optional (closes #3200)

This commit is contained in:
arkon
2020-05-20 17:39:01 -04:00
parent ed029c52ae
commit 647391ef73
6 changed files with 12 additions and 2 deletions

View File

@@ -307,7 +307,7 @@ class LibraryUpdateService(
}
}
if (failedUpdates.isNotEmpty()) {
if (preferences.showLibraryUpdateErrors() && failedUpdates.isNotEmpty()) {
val errorFile = writeErrorFile(failedUpdates)
notifier.showUpdateErrorNotification(
failedUpdates.map { it.first.title },

View File

@@ -123,6 +123,8 @@ object PreferenceKeys {
const val hideNotificationContent = "hide_notification_content"
const val showLibraryUpdateErrors = "show_library_update_errors"
const val downloadNew = "download_new"
const val downloadNewCategories = "download_new_categories"

View File

@@ -67,6 +67,8 @@ class PreferencesHelper(val context: Context) {
fun hideNotificationContent() = prefs.getBoolean(Keys.hideNotificationContent, false)
fun showLibraryUpdateErrors() = prefs.getBoolean(Keys.showLibraryUpdateErrors, false)
fun clear() = prefs.edit().clear().apply()
fun themeMode() = flowPrefs.getString(Keys.themeMode, Values.THEME_MODE_SYSTEM)