Skip to content

Commit bbce668

Browse files
authored
Merge pull request #379 from kooWZ/bugfix
Fix: #368
2 parents a514967 + 35d283b commit bbce668

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/page/forum/hole_detail.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -1175,14 +1175,16 @@ class Normal extends RenderModel {
11751175
if (isFavored != null) return isFavored!;
11761176
final List<int>? favorites =
11771177
await (ForumRepository.getInstance().getFavoriteHoleId());
1178-
return favorites!.any((elementId) => elementId == hole.hole_id);
1178+
isFavored = favorites!.any((elementId) => elementId == hole.hole_id);
1179+
return isFavored!;
11791180
}
11801181

11811182
Future<bool> isHoleSubscribed() async {
11821183
if (isSubscribed != null) return isSubscribed!;
11831184
final List<int>? subscriptions =
11841185
await (ForumRepository.getInstance().getSubscribedHoleId());
1185-
return subscriptions!.any((elementId) => elementId == hole.hole_id);
1186+
isSubscribed = subscriptions!.any((elementId) => elementId == hole.hole_id);
1187+
return isSubscribed!;
11861188
}
11871189
}
11881190

0 commit comments

Comments
 (0)