Skip to content

Commit

Permalink
Fix toggling favorites in ItemListFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Aug 18, 2024
1 parent 2997511 commit b00dbfe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fun ItemListFragment.toggleFavorite(item: BaseItemDto, callback: (item: BaseItem
lifecycleScope.launch {
val userData = itemMutationRepository.setFavorite(
item = item.id,
favorite = item.userData?.isFavorite ?: true
favorite = !(item.userData?.isFavorite ?: false)
)
callback(item.copy(userData = userData))
}
Expand Down

0 comments on commit b00dbfe

Please sign in to comment.