From 8d7ab13f5ce49d5b41700b9089eebe6bd2cc3013 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 8 May 2021 09:13:49 -0400 Subject: [PATCH] Don't toggle favorite status from snackbar if already added (fixes #5038) --- .../main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt index 153672316..8be864f0a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt @@ -944,7 +944,9 @@ class MangaController : if (view != null && !manga.favorite) { addSnackbar = (activity as? MainActivity)?.binding?.rootCoordinator?.snack(view.context.getString(R.string.snack_add_to_library), Snackbar.LENGTH_INDEFINITE) { setAction(R.string.action_add) { - addToLibrary(manga) + if (!manga.favorite) { + addToLibrary(manga) + } } } }