From f564314f3cc4793824250c7fdc55435a1336c5f5 Mon Sep 17 00:00:00 2001 From: perol Date: Thu, 19 Dec 2024 23:02:17 +0800 Subject: [PATCH] fix bookmark --- lib/page/picture/illust_store.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/page/picture/illust_store.dart b/lib/page/picture/illust_store.dart index 64a9dd952..cf860f718 100644 --- a/lib/page/picture/illust_store.dart +++ b/lib/page/picture/illust_store.dart @@ -115,8 +115,7 @@ abstract class _IllustStoreBase with Store { state = 1; if (force || !illusts!.isBookmarked) { try { - await ApiClient(isBookmark: true) - .postLikeIllust(illusts!.id, restrict, tags); + await apiClient.postLikeIllust(illusts!.id, restrict, tags); illusts!.isBookmarked = true; isBookmark = true; state = 2; @@ -124,7 +123,7 @@ abstract class _IllustStoreBase with Store { } catch (e) {} } else { try { - await ApiClient(isBookmark: true).postUnLikeIllust(illusts!.id); + await apiClient.postUnLikeIllust(illusts!.id); illusts!.isBookmarked = false; isBookmark = false; state = 0;