Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config to disable warnings for large updates #1597

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet
.groupBy { it.source }
.filterKeys { sourceManager.get(it) !is UnmeteredSource }
.maxOfOrNull { it.value.size } ?: 0
if (largestSourceSize > MANGA_PER_SOURCE_QUEUE_WARNING_THRESHOLD) {
if (largestSourceSize > MANGA_PER_SOURCE_QUEUE_WARNING_THRESHOLD && !preferences.disableNotificationSizeWarning().get()) {
notifier.showQueueSizeWarningNotification()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ object PreferenceKeys {

const val chaptersDescAsDefault = "chapters_desc_as_default"

const val disableNotificationSizeWarning = "disable_notification_size_warning"

fun trackUsername(syncId: Int) = "pref_mangasync_username_$syncId"

fun trackPassword(syncId: Int) = "pref_mangasync_password_$syncId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,4 +495,6 @@ class PreferencesHelper(val context: Context) {
fun coverColors() = flowPrefs.getStringSet(Keys.coverColors, emptySet())

fun useStaggeredGrid() = flowPrefs.getBoolean("use_staggered_grid", false)

fun disableNotificationSizeWarning() = flowPrefs.getBoolean(Keys.disableNotificationSizeWarning, false)
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ class SettingsGeneralController : SettingsController() {
}
}
}
switchPreference {
key = Keys.disableNotificationSizeWarning
titleRes = R.string.disable_notification_size_warning
defaultValue = false
}

preferenceCategory {
titleRes = R.string.app_shortcuts
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,7 @@
<string name="over_any_network">Over any network</string>
<string name="dont_auto_update">Don\'t auto-update</string>
<string name="language_requires_app_restart">Some languages may require an app relaunch to display correctly</string>
<string name="disable_notification_size_warning">Disable warnings for large updates</string>

<string name="app_shortcuts">App shortcuts</string>
<string name="show_recent_sources">Show recently used sources</string>
Expand Down