From c401915fb5c60a71cbeed37533cd2a8aea15d309 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 19 Jul 2020 12:13:50 -0400 Subject: [PATCH] Don't initialize mangas if viewing source in list view if on metered connection --- .../ui/browse/source/browse/BrowseSourceController.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt index 31a1108432..d05462db8a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt @@ -468,8 +468,9 @@ open class BrowseSourceController(bundle: Bundle) : presenter.refreshDisplayMode() activity?.invalidateOptionsMenu() setupRecycler(view) - if (mode == DisplayMode.LIST || !view.context.connectivityManager.isActiveNetworkMetered) { - // Initialize mangas if going to grid view or if over wifi when going to list view + + // Initialize mangas if not on a metered connection + if (!view.context.connectivityManager.isActiveNetworkMetered) { val mangas = (0 until adapter.itemCount).mapNotNull { (adapter.getItem(it) as? SourceItem)?.manga }