diff --git a/lib/pages/chat_list/client_chooser_button.dart b/lib/pages/chat_list/client_chooser_button.dart index 2cae902f6..68acc13cb 100644 --- a/lib/pages/chat_list/client_chooser_button.dart +++ b/lib/pages/chat_list/client_chooser_button.dart @@ -4,6 +4,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:go_router/go_router.dart'; import 'package:matrix/matrix.dart'; +import 'package:fluffychat/config/themes.dart'; import 'package:fluffychat/widgets/adaptive_dialogs/show_ok_cancel_alert_dialog.dart'; import 'package:fluffychat/widgets/avatar.dart'; import 'package:fluffychat/widgets/matrix.dart'; @@ -66,16 +67,17 @@ class ClientChooserButton extends StatelessWidget { ], ), ), - PopupMenuItem( - value: SettingsAction.settings, - child: Row( - children: [ - const Icon(Icons.settings_outlined), - const SizedBox(width: 18), - Text(L10n.of(context).settings), - ], + if (!FluffyThemes.isColumnMode(context)) + PopupMenuItem( + value: SettingsAction.settings, + child: Row( + children: [ + const Icon(Icons.settings_outlined), + const SizedBox(width: 18), + Text(L10n.of(context).settings), + ], + ), ), - ), const PopupMenuDivider(), for (final bundle in bundles) ...[ if (matrix.accountBundles[bundle]!.length != 1 || @@ -156,30 +158,22 @@ class ClientChooserButton extends StatelessWidget { matrix.accountBundles.forEach((key, value) => clientCount += value.length); return FutureBuilder( future: matrix.client.fetchOwnProfile(), - builder: (context, snapshot) => Stack( - alignment: Alignment.center, - children: [ - ...List.generate( - clientCount, - (index) => const SizedBox.shrink(), - ), - const SizedBox.shrink(), - const SizedBox.shrink(), - PopupMenuButton( - onSelected: (o) => _clientSelected(o, context), - itemBuilder: _bundleMenuItems, - child: Material( - color: Colors.transparent, - borderRadius: BorderRadius.circular(99), - child: Avatar( - mxContent: snapshot.data?.avatarUrl, - name: snapshot.data?.displayName ?? - matrix.client.userID!.localpart, - size: 32, - ), + builder: (context, snapshot) => Material( + clipBehavior: Clip.hardEdge, + borderRadius: BorderRadius.circular(99), + color: Colors.transparent, + child: PopupMenuButton( + onSelected: (o) => _clientSelected(o, context), + itemBuilder: _bundleMenuItems, + child: Center( + child: Avatar( + mxContent: snapshot.data?.avatarUrl, + name: + snapshot.data?.displayName ?? matrix.client.userID!.localpart, + size: 32, ), ), - ], + ), ), ); } diff --git a/pubspec.lock b/pubspec.lock index 333376f33..3515a3642 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -810,10 +810,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: f02fd7d2a4dc512fec615529824fdd217fecb3a3d3de68360293a551f21634b3 + sha256: "0b1e06223bee260dee31a171fb1153e306907563a0b0225e8c1733211911429a" url: "https://pub.dev" source: hosted - version: "14.8.1" + version: "15.1.2" gtk: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c83a4d154..737a34b4a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -49,7 +49,7 @@ dependencies: flutter_web_auth_2: ^3.1.1 # Version 4 blocked by https://github.com/MixinNetwork/flutter-plugins/issues/379 flutter_webrtc: ^0.12.9 geolocator: ^13.0.1 - go_router: ^14.8.1 + go_router: ^15.1.2 handy_window: ^0.4.0 hive: ^2.2.3 hive_flutter: ^1.1.0