Fixup! Implement remove favourite

This commit is contained in:
tarsin committed 2023-01-25 10:17:42 +08:00
1 parent ef475000c3
commit a18e6f4b63
1 file changed
+3
@@ -70,6 +70,7 @@ fun <T : GalleryInfo> GalleryListLongClickDialog(
val context = LocalContext.current val context = LocalContext.current
val removeFromFavouriteSuccess = stringResource(id = R.string.remove_from_favorite_success) val removeFromFavouriteSuccess = stringResource(id = R.string.remove_from_favorite_success)
val removeFromFavouriteFailure = stringResource(id = R.string.remove_from_favorite_failure)
AlertDialog( AlertDialog(
onDismissRequest = { onDismissRequest = {
@@ -135,6 +136,8 @@ fun <T : GalleryInfo> GalleryListLongClickDialog(
info.favoriteName = null info.favoriteName = null
EhDB.putHistoryInfoNonRefresh(info) EhDB.putHistoryInfoNonRefresh(info)
showTip(removeFromFavouriteSuccess) showTip(removeFromFavouriteSuccess)
}.onFailure {
showTip(removeFromFavouriteFailure)
} }
} }
}, },