Only fetch intems if item caching is enabled.
This commit is contained in:
1 parent
d9ef301e0f
commit
8106faa45c
1 file changed
+5
-2
@@ -143,8 +143,11 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar
|
||||
|
||||
handleSwipeRefreshLayout()
|
||||
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
repository.tryToCacheItemsAndGetNewOnes()
|
||||
|
||||
if (appSettingsService.isItemCachingEnabled()) {
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
repository.tryToCacheItemsAndGetNewOnes()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user