From 3da8677e3223fd8f22254b40e10fa515bf155d08 Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 31 Jan 2022 15:14:50 -0500 Subject: [PATCH] Disable update/download warnings for stable release --- .../eu/kanade/tachiyomi/data/download/Downloader.kt | 10 ++++------ .../tachiyomi/data/library/LibraryUpdateService.kt | 5 ++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt index 30381f0c3..946178530 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt @@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.data.download import android.content.Context import android.webkit.MimeTypeMap -import android.widget.Toast import com.hippo.unifile.UniFile import com.jakewharton.rxrelay.BehaviorRelay import com.jakewharton.rxrelay.PublishRelay @@ -22,12 +21,10 @@ import eu.kanade.tachiyomi.util.lang.RetryWithDelay import eu.kanade.tachiyomi.util.lang.launchIO import eu.kanade.tachiyomi.util.lang.launchNow import eu.kanade.tachiyomi.util.lang.plusAssign -import eu.kanade.tachiyomi.util.lang.withUIContext import eu.kanade.tachiyomi.util.storage.DiskUtil import eu.kanade.tachiyomi.util.storage.saveTo import eu.kanade.tachiyomi.util.system.ImageUtil import eu.kanade.tachiyomi.util.system.logcat -import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.async import logcat.LogPriority import okhttp3.Response @@ -278,10 +275,11 @@ class Downloader( .groupBy { it.source } .filterKeys { it !is UnmeteredSource } .maxOf { it.value.size } + // TODO: re-enable warning if (maxDownloadsFromSource > CHAPTERS_PER_SOURCE_QUEUE_WARNING_THRESHOLD) { - withUIContext { - context.toast(R.string.download_queue_size_warning, Toast.LENGTH_LONG) - } +// withUIContext { +// context.toast(R.string.download_queue_size_warning, Toast.LENGTH_LONG) +// } } DownloadService.start(context) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt index 76ff9dc8b..61d03ecd0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt @@ -5,7 +5,6 @@ import android.content.Context import android.content.Intent import android.os.IBinder import android.os.PowerManager -import android.widget.Toast import androidx.core.content.ContextCompat import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.cache.CoverCache @@ -41,7 +40,6 @@ import eu.kanade.tachiyomi.util.system.acquireWakeLock import eu.kanade.tachiyomi.util.system.createFileInCacheDir import eu.kanade.tachiyomi.util.system.isServiceRunning import eu.kanade.tachiyomi.util.system.logcat -import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -279,8 +277,9 @@ class LibraryUpdateService( .groupBy { it.source } .filterKeys { sourceManager.get(it) !is UnmeteredSource } .maxOfOrNull { it.value.size } ?: 0 + // TODO: re-enable warning if (maxUpdatesFromSource > MANGA_PER_SOURCE_QUEUE_WARNING_THRESHOLD) { - toast(R.string.notification_size_warning, Toast.LENGTH_LONG) +// toast(R.string.notification_size_warning, Toast.LENGTH_LONG) } }