Skip to content

Commit

Permalink
fix bookmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Notsfsssf committed Dec 19, 2024
1 parent 29bab7d commit f564314
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/page/picture/illust_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,15 @@ 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;
return true;
} catch (e) {}
} else {
try {
await ApiClient(isBookmark: true).postUnLikeIllust(illusts!.id);
await apiClient.postUnLikeIllust(illusts!.id);
illusts!.isBookmarked = false;
isBookmark = false;
state = 0;
Expand Down

0 comments on commit f564314

Please sign in to comment.