refactor: update to matrix 6.0.0
This commit is contained in:
parent
fa27ab2141
commit
f31887b6d2
5 changed files with 30 additions and 21 deletions
|
|
@ -28,12 +28,7 @@ class SettingsView extends StatelessWidget {
|
|||
final activeRoute = GoRouter.of(
|
||||
context,
|
||||
).routeInformationProvider.value.uri.path;
|
||||
final accountManageUrl = Matrix.of(context)
|
||||
.client
|
||||
.wellKnown
|
||||
?.additionalProperties
|
||||
.tryGetMap<String, Object?>('org.matrix.msc2965.authentication')
|
||||
?.tryGet<String>('account');
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
if (FluffyThemes.isColumnMode(context)) ...[
|
||||
|
|
@ -152,16 +147,30 @@ class SettingsView extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
),
|
||||
if (accountManageUrl != null)
|
||||
ListTile(
|
||||
leading: const Icon(Icons.account_circle_outlined),
|
||||
title: Text(L10n.of(context).manageAccount),
|
||||
trailing: const Icon(Icons.open_in_new_outlined),
|
||||
onTap: () => launchUrlString(
|
||||
accountManageUrl,
|
||||
mode: LaunchMode.inAppBrowserView,
|
||||
),
|
||||
),
|
||||
FutureBuilder(
|
||||
future: Matrix.of(context).client.getWellknown(),
|
||||
builder: (context, snapshot) {
|
||||
final accountManageUrl = snapshot
|
||||
.data
|
||||
?.additionalProperties
|
||||
.tryGetMap<String, Object?>(
|
||||
'org.matrix.msc2965.authentication',
|
||||
)
|
||||
?.tryGet<String>('account');
|
||||
if (accountManageUrl == null) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.account_circle_outlined),
|
||||
title: Text(L10n.of(context).manageAccount),
|
||||
trailing: const Icon(Icons.open_in_new_outlined),
|
||||
onTap: () => launchUrlString(
|
||||
accountManageUrl,
|
||||
mode: LaunchMode.inAppBrowserView,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Divider(color: theme.dividerColor),
|
||||
if (showChatBackupBanner == null)
|
||||
ListTile(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue