chore: Update matrix und vrouter
This commit is contained in:
parent
83665b593b
commit
7ca96aee03
35 changed files with 63 additions and 63 deletions
|
|
@ -78,7 +78,7 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||
final success = await showFutureLoadingDialog(
|
||||
context: context, future: () => widget.room.leave());
|
||||
if (success.error == null) {
|
||||
VRouter.of(context).push('/rooms');
|
||||
VRouter.of(context).to('/rooms');
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -95,7 +95,7 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||
widget.room.setPushRuleState(PushRuleState.notify));
|
||||
break;
|
||||
case 'details':
|
||||
VRouter.of(context).push('/rooms/${widget.room.id}/details');
|
||||
VRouter.of(context).to('/rooms/${widget.room.id}/details');
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class _ContactListTile extends StatelessWidget {
|
|||
fontWeight: FontWeight.bold,
|
||||
)
|
||||
: null),
|
||||
onTap: () => VRouter.of(context).push(
|
||||
onTap: () => VRouter.of(context).to(
|
||||
'/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).push('/rooms/${widget.room.id}/encryption');
|
||||
VRouter.of(context).to('/rooms/${widget.room.id}/encryption');
|
||||
return;
|
||||
}
|
||||
if (widget.room.joinRules == JoinRules.public) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class LoadingView extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
if (Matrix.of(context).loginState != null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(_) => context.vRouter.push(
|
||||
(_) => VRouter.of(context).to(
|
||||
Matrix.of(context).loginState == LoginState.logged
|
||||
? '/rooms'
|
||||
: '/home',
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class ChatListItem extends StatelessWidget {
|
|||
}
|
||||
Matrix.of(context).shareContent = null;
|
||||
}
|
||||
context.vRouter.push('/rooms/${room.id}');
|
||||
VRouter.of(context).to('/rooms/${room.id}');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class PublicRoomListItem extends StatelessWidget {
|
|||
future: () => _joinRoomAndWait(context),
|
||||
);
|
||||
if (success.error == null) {
|
||||
VRouter.of(context).pushNamed('/rooms/${success.result}');
|
||||
VRouter.of(context).toNamed('/rooms/${success.result}');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
.contains(widget.router.currentState.url);
|
||||
if (widget.router.currentState.url == '/' ||
|
||||
(state == LoginState.logged) == isInLoginRoutes) {
|
||||
widget.router.currentState.push(
|
||||
widget.router.currentState.to(
|
||||
loginState == LoginState.logged ? '/rooms' : '/home',
|
||||
queryParameters: widget.router.currentState.queryParameters,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue