mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 03:59:19 +01:00
Don't initialize mangas if viewing source in list view if on metered connection
This commit is contained in:
parent
2a202bd510
commit
c401915fb5
@ -468,8 +468,9 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||||||
presenter.refreshDisplayMode()
|
presenter.refreshDisplayMode()
|
||||||
activity?.invalidateOptionsMenu()
|
activity?.invalidateOptionsMenu()
|
||||||
setupRecycler(view)
|
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 {
|
val mangas = (0 until adapter.itemCount).mapNotNull {
|
||||||
(adapter.getItem(it) as? SourceItem)?.manga
|
(adapter.getItem(it) as? SourceItem)?.manga
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user