fix: No crash on logging out in client chooser button
This commit is contained in:
parent
6583bfdabf
commit
3078e9788f
1 changed files with 2 additions and 2 deletions
|
|
@ -156,7 +156,7 @@ class ClientChooserButton extends StatelessWidget {
|
|||
var clientCount = 0;
|
||||
matrix.accountBundles.forEach((key, value) => clientCount += value.length);
|
||||
return FutureBuilder<Profile>(
|
||||
future: matrix.client.fetchOwnProfile(),
|
||||
future: matrix.client.isLogged() ? matrix.client.fetchOwnProfile() : null,
|
||||
builder: (context, snapshot) => Material(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
borderRadius: BorderRadius.circular(99),
|
||||
|
|
@ -171,7 +171,7 @@ class ClientChooserButton extends StatelessWidget {
|
|||
child: Avatar(
|
||||
mxContent: snapshot.data?.avatarUrl,
|
||||
name:
|
||||
snapshot.data?.displayName ?? matrix.client.userID!.localpart,
|
||||
snapshot.data?.displayName ?? matrix.client.userID?.localpart,
|
||||
size: 32,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue