fix: auto-delete bookmark note in TestUserDataRepository on unbookmark

Co-Authored-By: Claude <noreply@anthropic.com>
pull/2125/head
Rohit Karadkar 2 weeks ago
parent a37cc724f1
commit 1540bbdca0

@ -68,8 +68,9 @@ class TestUserDataRepository : UserDataRepository {
} else {
current.bookmarkedNewsResources - newsResourceId
}
val notes = if (bookmarked) current.bookmarkNotes else current.bookmarkNotes - newsResourceId
_userData.tryEmit(current.copy(bookmarkedNewsResources = bookmarkedNews))
_userData.tryEmit(current.copy(bookmarkedNewsResources = bookmarkedNews, bookmarkNotes = notes))
}
}

Loading…
Cancel
Save