fix: use vrouter.toSegments
This commit is contained in:
parent
4a02f9d076
commit
02e57474fe
22 changed files with 47 additions and 38 deletions
|
|
@ -95,7 +95,8 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||
widget.room.setPushRuleState(PushRuleState.notify));
|
||||
break;
|
||||
case 'details':
|
||||
VRouter.of(context).to('/rooms/${widget.room.id}/details');
|
||||
VRouter.of(context)
|
||||
.toSegments(['rooms', widget.room.id, 'details']);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -102,8 +102,12 @@ class _ContactListTile extends StatelessWidget {
|
|||
fontWeight: FontWeight.bold,
|
||||
)
|
||||
: null),
|
||||
onTap: () => VRouter.of(context).to(
|
||||
'/rooms/${Matrix.of(context).client.getDirectChatFromUserId(contact.senderId)}'),
|
||||
onTap: () => VRouter.of(context).toSegments([
|
||||
'rooms',
|
||||
Matrix.of(context)
|
||||
.client
|
||||
.getDirectChatFromUserId(contact.senderId)
|
||||
]),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class _EncryptionButtonState extends State<EncryptionButton> {
|
|||
|
||||
void _enableEncryptionAction() async {
|
||||
if (widget.room.encrypted) {
|
||||
VRouter.of(context).to('/rooms/${widget.room.id}/encryption');
|
||||
VRouter.of(context).toSegments(['rooms', widget.room.id, 'encryption']);
|
||||
return;
|
||||
}
|
||||
if (widget.room.joinRules == JoinRules.public) {
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class ChatListItem extends StatelessWidget {
|
|||
}
|
||||
Matrix.of(context).shareContent = null;
|
||||
}
|
||||
VRouter.of(context).to('/rooms/${room.id}');
|
||||
VRouter.of(context).toSegments(['rooms', room.id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class PublicRoomListItem extends StatelessWidget {
|
|||
future: () => _joinRoomAndWait(context),
|
||||
);
|
||||
if (success.error == null) {
|
||||
VRouter.of(context).toNamed('/rooms/${success.result}');
|
||||
VRouter.of(context).toSegments(['rooms', success.result]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue