fix(CategoryPresenter): Run setCategories on Main thread

Fixes GH-273
This commit is contained in:
Ahmad Ansori Palembani 2024-12-03 15:00:05 +07:00
parent 8c96e8d4b6
commit 723abbe520
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -100,7 +100,9 @@ class CategoryPresenter(
scope.launch { scope.launch {
deleteCategories.awaitOne(safeCategory.toLong()) deleteCategories.awaitOne(safeCategory.toLong())
categories.remove(category) categories.remove(category)
controller.setCategories(categories.map(::CategoryItem)) withContext(Dispatchers.Main) {
controller.setCategories(categories.map(::CategoryItem))
}
} }
} }