mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 08:17:04 +05:30
android: run ClawViewModel#toggleSave
on IO Dispatcher
This commit is contained in:
parent
733cae4815
commit
cf9e8487ff
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ constructor(
|
|||
}
|
||||
|
||||
fun toggleSave(post: SavedPost) {
|
||||
viewModelScope.launch {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
val saved = isPostSaved(post)
|
||||
if (saved) {
|
||||
repository.removePost(post)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue