mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix(CategoryPresenter): Run setCategories on Main thread
Fixes GH-273
This commit is contained in:
parent
8c96e8d4b6
commit
723abbe520
1 changed files with 3 additions and 1 deletions
|
@ -100,9 +100,11 @@ class CategoryPresenter(
|
|||
scope.launch {
|
||||
deleteCategories.awaitOne(safeCategory.toLong())
|
||||
categories.remove(category)
|
||||
withContext(Dispatchers.Main) {
|
||||
controller.setCategories(categories.map(::CategoryItem))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorders the given categories in the database.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue