diff --git a/lib/pages/views/chat_view.dart b/lib/pages/views/chat_view.dart index 20d7cf3a..fd7da68c 100644 --- a/lib/pages/views/chat_view.dart +++ b/lib/pages/views/chat_view.dart @@ -821,32 +821,36 @@ class _ChatAccountPicker extends StatelessWidget { controller.matrix ??= Matrix.of(context); final clients = controller.matrix.currentBundle; clients.removeWhere((c) => c.getRoomById(controller.roomId) == null); - return FutureBuilder( - future: controller.matrix.client.ownProfile, - builder: (context, snapshot) => PopupMenuButton( - onSelected: _popupMenuButtonSelected, - itemBuilder: (BuildContext context) => clients - .map((client) => PopupMenuItem( - value: client.userID, - child: FutureBuilder( - future: client.ownProfile, - builder: (context, snapshot) => ListTile( - leading: Avatar( - snapshot.data?.avatarUrl, - snapshot.data?.displayName ?? client.userID.localpart, - size: 20, + return Padding( + padding: const EdgeInsets.all(8.0), + child: FutureBuilder( + future: controller.matrix.client.ownProfile, + builder: (context, snapshot) => PopupMenuButton( + onSelected: _popupMenuButtonSelected, + itemBuilder: (BuildContext context) => clients + .map((client) => PopupMenuItem( + value: client.userID, + child: FutureBuilder( + future: client.ownProfile, + builder: (context, snapshot) => ListTile( + leading: Avatar( + snapshot.data?.avatarUrl, + snapshot.data?.displayName ?? client.userID.localpart, + size: 20, + ), + title: + Text(snapshot.data?.displayName ?? client.userID), + contentPadding: EdgeInsets.all(0), ), - title: Text(snapshot.data?.displayName ?? client.userID), - contentPadding: EdgeInsets.all(0), ), - ), - )) - .toList(), - child: Avatar( - snapshot.data?.avatarUrl, - snapshot.data?.displayName ?? - controller.matrix.client.userID.localpart, - size: 20, + )) + .toList(), + child: Avatar( + snapshot.data?.avatarUrl, + snapshot.data?.displayName ?? + controller.matrix.client.userID.localpart, + size: 20, + ), ), ), );