pull/30/head
Lucas Delanier 2 years ago
parent 93e83bb335
commit b0ed6b3934

@ -54,14 +54,14 @@ class _FeedScreenState extends State<FeedScreen> with SingleTickerProviderStateM
if (choice) { if (choice) {
setState(() { setState(() {
animationController.reset(); animationController.reset();
displayFeed = MyApp.postViewModel.postsFriends; displayFeed = MyApp.postViewModel.postsFriends.reversed.toList();
animationController.forward(); animationController.forward();
print(displayFeed.length); print(displayFeed.length);
}); });
} else { } else {
setState(() { setState(() {
animationController.reset(); animationController.reset();
displayFeed = MyApp.postViewModel.bestPosts; displayFeed = MyApp.postViewModel.bestPosts.reversed.toList();
print(displayFeed.length); print(displayFeed.length);
animationController.forward(); animationController.forward();
}); });

@ -22,8 +22,7 @@ class PostViewModel {
List<Post> get bestPosts => _bestPosts; List<Post> get bestPosts => _bestPosts;
// Methods // Methods
addPost(String? description, String idMusic, File? image, addPost(String? description, String idMusic, File? image, Tuple2<String, String>? location) async {
Tuple2<String, String>? location) async {
await _postService.createPost(description, idMusic, image, location); await _postService.createPost(description, idMusic, image, location);
} }

Loading…
Cancel
Save