From 6528ef5bc2d3ff226a23be5472e7bcb9e5b59927 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 16 May 2020 17:24:47 +0200 Subject: [PATCH] Auto adapt the list of friends to show --- lib/ui/routes/main_route/main_route.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ui/routes/main_route/main_route.dart b/lib/ui/routes/main_route/main_route.dart index 5d0a3af..ba252f5 100644 --- a/lib/ui/routes/main_route/main_route.dart +++ b/lib/ui/routes/main_route/main_route.dart @@ -125,8 +125,12 @@ abstract class MainController extends State { void openGroupsListPage() => pushPage(PageInfo(child: GroupsListScreen())); /// Display the list of friends of a user - void openUserFriendsList(int userID) => - pushPage(PageInfo(child: OtherUserFriendsListScreen(userID: userID))); + void openUserFriendsList(int id) { + if (id != userID()) + pushPage(PageInfo(child: OtherUserFriendsListScreen(userID: id))); + else + openFriendsList(); + } /// Push a new widget void push(Widget w,