Skip to content

Commit

Permalink
Merge pull request #379 from kooWZ/bugfix
Browse files Browse the repository at this point in the history
Fix: #368
  • Loading branch information
w568w authored Jul 2, 2024
2 parents a514967 + 35d283b commit bbce668
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/page/forum/hole_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1175,14 +1175,16 @@ class Normal extends RenderModel {
if (isFavored != null) return isFavored!;
final List<int>? favorites =
await (ForumRepository.getInstance().getFavoriteHoleId());
return favorites!.any((elementId) => elementId == hole.hole_id);
isFavored = favorites!.any((elementId) => elementId == hole.hole_id);
return isFavored!;
}

Future<bool> isHoleSubscribed() async {
if (isSubscribed != null) return isSubscribed!;
final List<int>? subscriptions =
await (ForumRepository.getInstance().getSubscribedHoleId());
return subscriptions!.any((elementId) => elementId == hole.hole_id);
isSubscribed = subscriptions!.any((elementId) => elementId == hole.hole_id);
return isSubscribed!;
}
}

Expand Down

0 comments on commit bbce668

Please sign in to comment.