Skip to content

Commit e5c49a2

Browse files
committed
fix(client): notifyListeners after initialize
1 parent 0c67814 commit e5c49a2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

client/lib/view_models/view_model_videos.dart

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class FavoriteVideoViewModel extends ChangeNotifier {
5353
?.map((e) => int.parse(e, radix: 10))
5454
.toSet() ??
5555
{};
56+
notifyListeners();
5657
}
5758

5859
Future<void> toggleFavoriteVideo(int prID) async {

client/lib/widgets/detail/recommendation.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ class RecommendationWidget extends StatelessWidget {
4242
ScaffoldMessenger.of(context).removeCurrentSnackBar();
4343
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
4444
backgroundColor: Theme.of(context).colorScheme.error,
45-
content: Text("https://arxiv.org/abs/${paper.arxivId} is not a valid URL"),
45+
content: Text(
46+
"https://arxiv.org/abs/${paper.arxivId} is not a valid URL"),
4647
action: SnackBarAction(
4748
label: "OK",
4849
textColor: Theme.of(context).colorScheme.onError,
49-
onPressed: (){},
50+
onPressed: () {},
5051
),
5152
));
5253
},

0 commit comments

Comments
 (0)