WIP: HomeActivity cleanup #40

Closed
davidoskky wants to merge 3 commits from davidoskky/ReaderForSelfoss-multiplatform:dispatchers into master
2 changed files with 2 additions and 1 deletions
Showing only changes of commit ac0156748b - Show all commits

View File

@ -336,7 +336,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar
handleRecurringTask()
CoroutineScope(Dispatchers.Main).launch {
CoroutineScope(Dispatchers.IO).launch {
repository.handleDBActions()
}

View File

@ -55,6 +55,7 @@ class AppViewModel(private val repository: Repository) : ViewModel() {
}
fun getItems(appendResults: Boolean, itemType: ItemType) {
// TODO: Find a way to use Dispatchers.IO without creating conflicts
CoroutineScope(Dispatchers.Main).launch {
_refreshingIndicatorProvider.emit(true)
repository.displayedItems = itemType