Only fetch intems if item caching is enabled.

This commit is contained in:
aminecmi 2022-09-26 16:05:07 +02:00
parent d9ef301e0f
commit 8106faa45c

View File

@ -143,8 +143,11 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar
handleSwipeRefreshLayout() handleSwipeRefreshLayout()
CoroutineScope(Dispatchers.Main).launch {
repository.tryToCacheItemsAndGetNewOnes() if (appSettingsService.isItemCachingEnabled()) {
CoroutineScope(Dispatchers.Main).launch {
repository.tryToCacheItemsAndGetNewOnes()
}
} }
} }