浏览代码

Don't toggle favorite status from snackbar if already added (fixes #5038)

arkon 3 年之前
父节点
当前提交
8d7ab13f5c
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt

+ 3 - 1
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)
+                    }
                 }
             }
         }