|
|
|
@ -15,7 +15,7 @@ import 'chat_list.dart';
|
|
|
|
|
class ClientChooserButton extends StatelessWidget {
|
|
|
|
|
final ChatListController controller;
|
|
|
|
|
|
|
|
|
|
const ClientChooserButton(this.controller, {Key? key}) : super(key: key);
|
|
|
|
|
const ClientChooserButton(this.controller, {super.key});
|
|
|
|
|
|
|
|
|
|
List<PopupMenuEntry<Object>> _bundleMenuItems(BuildContext context) {
|
|
|
|
|
final matrix = Matrix.of(context);
|
|
|
|
@ -112,8 +112,7 @@ class ClientChooserButton extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
...matrix.accountBundles[bundle]!
|
|
|
|
|
.map(
|
|
|
|
|
...matrix.accountBundles[bundle]!.map(
|
|
|
|
|
(client) => PopupMenuItem(
|
|
|
|
|
value: client,
|
|
|
|
|
child: FutureBuilder<Profile?>(
|
|
|
|
@ -127,16 +126,15 @@ class ClientChooserButton extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
Avatar(
|
|
|
|
|
mxContent: snapshot.data?.avatarUrl,
|
|
|
|
|
name: snapshot.data?.displayName ??
|
|
|
|
|
client.userID!.localpart,
|
|
|
|
|
name:
|
|
|
|
|
snapshot.data?.displayName ?? client.userID!.localpart,
|
|
|
|
|
size: 32,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 12),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
snapshot.data?.displayName ??
|
|
|
|
|
client.userID!.localpart!,
|
|
|
|
|
snapshot.data?.displayName ?? client.userID!.localpart!,
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -152,8 +150,7 @@ class ClientChooserButton extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
.toList(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
PopupMenuItem(
|
|
|
|
|
value: SettingsAction.addAccount,
|
|
|
|
|