fix: use vrouter.toSegments

This commit is contained in:
Sorunome 2021-08-15 13:26:16 +02:00
commit 02e57474fe
22 changed files with 47 additions and 38 deletions

View file

@ -52,11 +52,11 @@ class ChatDetailsView extends StatelessWidget {
SliverAppBar(
leading: IconButton(
icon: Icon(Icons.close_outlined),
onPressed: () => VRouter.of(context)
.path
.startsWith('/spaces/')
? VRouter.of(context).pop()
: VRouter.of(context).to('/rooms/${controller.roomId}'),
onPressed: () =>
VRouter.of(context).path.startsWith('/spaces/')
? VRouter.of(context).pop()
: VRouter.of(context)
.toSegments(['rooms', controller.roomId]),
),
elevation: Theme.of(context).appBarTheme.elevation,
expandedHeight: 300.0,
@ -264,7 +264,8 @@ class ChatDetailsView extends StatelessWidget {
.visibilityOfTheChatHistory),
subtitle: Text(
room.historyVisibility.getLocalizedString(
MatrixLocals(L10n.of(context))),
MatrixLocals(L10n.of(context))) ??
'',
),
),
),