diff --git a/Sources/justMUSIC/lib/screens/feed_screen.dart b/Sources/justMUSIC/lib/screens/feed_screen.dart index d88c856..5b0e2de 100644 --- a/Sources/justMUSIC/lib/screens/feed_screen.dart +++ b/Sources/justMUSIC/lib/screens/feed_screen.dart @@ -54,14 +54,14 @@ class _FeedScreenState extends State with SingleTickerProviderStateM if (choice) { setState(() { animationController.reset(); - displayFeed = MyApp.postViewModel.postsFriends; + displayFeed = MyApp.postViewModel.postsFriends.reversed.toList(); animationController.forward(); print(displayFeed.length); }); } else { setState(() { animationController.reset(); - displayFeed = MyApp.postViewModel.bestPosts; + displayFeed = MyApp.postViewModel.bestPosts.reversed.toList(); print(displayFeed.length); animationController.forward(); }); diff --git a/Sources/justMUSIC/lib/view_model/PostViewModel.dart b/Sources/justMUSIC/lib/view_model/PostViewModel.dart index a674b81..8bd6d55 100644 --- a/Sources/justMUSIC/lib/view_model/PostViewModel.dart +++ b/Sources/justMUSIC/lib/view_model/PostViewModel.dart @@ -22,8 +22,7 @@ class PostViewModel { List get bestPosts => _bestPosts; // Methods - addPost(String? description, String idMusic, File? image, - Tuple2? location) async { + addPost(String? description, String idMusic, File? image, Tuple2? location) async { await _postService.createPost(description, idMusic, image, location); }