mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-19 10:39:26 +01:00
chore: Update matrix und vrouter
This commit is contained in:
parent
37179a0665
commit
fbc78119fa
@ -427,7 +427,7 @@ class ChatController extends State<Chat> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
setState(() => selectedEvents.clear());
|
setState(() => selectedEvents.clear());
|
||||||
VRouter.of(context).push('/rooms');
|
VRouter.of(context).to('/rooms');
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendAgainAction() {
|
void sendAgainAction() {
|
||||||
@ -594,7 +594,7 @@ class ChatController extends State<Chat> {
|
|||||||
future: room.leave,
|
future: room.leave,
|
||||||
);
|
);
|
||||||
if (result.error == null) {
|
if (result.error == null) {
|
||||||
VRouter.of(context).push('/rooms/${result.result}');
|
VRouter.of(context).to('/rooms/${result.result}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,9 +240,9 @@ class ChatDetailsController extends State<ChatDetails> {
|
|||||||
if ((room.states['im.ponies.room_emotes'] ?? <String, Event>{})
|
if ((room.states['im.ponies.room_emotes'] ?? <String, Event>{})
|
||||||
.keys
|
.keys
|
||||||
.any((String s) => s.isNotEmpty)) {
|
.any((String s) => s.isNotEmpty)) {
|
||||||
VRouter.of(context).push('/rooms/${room.id}/details/multiple_emotes');
|
VRouter.of(context).to('/rooms/${room.id}/details/multiple_emotes');
|
||||||
} else {
|
} else {
|
||||||
VRouter.of(context).push('/rooms/${room.id}/details/emotes');
|
VRouter.of(context).to('/rooms/${room.id}/details/emotes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ class ChatListController extends State<ChatList> {
|
|||||||
await BootstrapDialog(
|
await BootstrapDialog(
|
||||||
client: Matrix.of(context).client,
|
client: Matrix.of(context).client,
|
||||||
).show(context);
|
).show(context);
|
||||||
VRouter.of(context).push('/rooms');
|
VRouter.of(context).to('/rooms');
|
||||||
}
|
}
|
||||||
|
|
||||||
String get activeChat => VRouter.of(context).pathParameters['roomid'];
|
String get activeChat => VRouter.of(context).pathParameters['roomid'];
|
||||||
@ -66,7 +66,7 @@ class ChatListController extends State<ChatList> {
|
|||||||
|
|
||||||
void _processIncomingSharedFiles(List<SharedMediaFile> files) {
|
void _processIncomingSharedFiles(List<SharedMediaFile> files) {
|
||||||
if (files?.isEmpty ?? true) return;
|
if (files?.isEmpty ?? true) return;
|
||||||
VRouter.of(context).push('/rooms');
|
VRouter.of(context).to('/rooms');
|
||||||
final file = File(files.first.path);
|
final file = File(files.first.path);
|
||||||
|
|
||||||
Matrix.of(context).shareContent = {
|
Matrix.of(context).shareContent = {
|
||||||
@ -80,7 +80,7 @@ class ChatListController extends State<ChatList> {
|
|||||||
|
|
||||||
void _processIncomingSharedText(String text) {
|
void _processIncomingSharedText(String text) {
|
||||||
if (text == null) return;
|
if (text == null) return;
|
||||||
VRouter.of(context).push('/rooms');
|
VRouter.of(context).to('/rooms');
|
||||||
if (text.toLowerCase().startsWith(AppConfig.inviteLinkPrefix) ||
|
if (text.toLowerCase().startsWith(AppConfig.inviteLinkPrefix) ||
|
||||||
(text.toLowerCase().startsWith(AppConfig.schemePrefix) &&
|
(text.toLowerCase().startsWith(AppConfig.schemePrefix) &&
|
||||||
!RegExp(r'\s').hasMatch(text))) {
|
!RegExp(r'\s').hasMatch(text))) {
|
||||||
@ -97,7 +97,7 @@ class ChatListController extends State<ChatList> {
|
|||||||
if (text.toLowerCase().startsWith(AppConfig.inviteLinkPrefix) ||
|
if (text.toLowerCase().startsWith(AppConfig.inviteLinkPrefix) ||
|
||||||
(text.toLowerCase().startsWith(AppConfig.schemePrefix) &&
|
(text.toLowerCase().startsWith(AppConfig.schemePrefix) &&
|
||||||
!RegExp(r'\s').hasMatch(text))) {
|
!RegExp(r'\s').hasMatch(text))) {
|
||||||
VRouter.of(context).push('/rooms');
|
VRouter.of(context).to('/rooms');
|
||||||
UrlLauncher(context, text).openMatrixToUrl();
|
UrlLauncher(context, text).openMatrixToUrl();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -221,7 +221,7 @@ class ChatListController extends State<ChatList> {
|
|||||||
setStatus();
|
setStatus();
|
||||||
break;
|
break;
|
||||||
case PopupMenuAction.settings:
|
case PopupMenuAction.settings:
|
||||||
VRouter.of(context).push('/settings');
|
VRouter.of(context).to('/settings');
|
||||||
break;
|
break;
|
||||||
case PopupMenuAction.invite:
|
case PopupMenuAction.invite:
|
||||||
FluffyShare.share(
|
FluffyShare.share(
|
||||||
@ -230,10 +230,10 @@ class ChatListController extends State<ChatList> {
|
|||||||
context);
|
context);
|
||||||
break;
|
break;
|
||||||
case PopupMenuAction.newGroup:
|
case PopupMenuAction.newGroup:
|
||||||
VRouter.of(context).push('/newgroup');
|
VRouter.of(context).to('/newgroup');
|
||||||
break;
|
break;
|
||||||
case PopupMenuAction.archive:
|
case PopupMenuAction.archive:
|
||||||
VRouter.of(context).push('/archive');
|
VRouter.of(context).to('/archive');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||||||
|
|
||||||
void _processIncomingUris(String text) async {
|
void _processIncomingUris(String text) async {
|
||||||
if (text == null || !text.startsWith(AppConfig.appOpenUrlScheme)) return;
|
if (text == null || !text.startsWith(AppConfig.appOpenUrlScheme)) return;
|
||||||
VRouter.of(context).push('/home');
|
VRouter.of(context).to('/home');
|
||||||
final token = Uri.parse(text).queryParameters['loginToken'];
|
final token = Uri.parse(text).queryParameters['loginToken'];
|
||||||
if (token != null) _loginWithToken(token);
|
if (token != null) _loginWithToken(token);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ class ImageViewerController extends State<ImageViewer> {
|
|||||||
/// Forward this image to another room.
|
/// Forward this image to another room.
|
||||||
void forwardAction() {
|
void forwardAction() {
|
||||||
Matrix.of(context).shareContent = widget.event.content;
|
Matrix.of(context).shareContent = widget.event.content;
|
||||||
VRouter.of(context).push('/rooms');
|
VRouter.of(context).to('/rooms');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Open this file with a system call.
|
/// Open this file with a system call.
|
||||||
|
@ -32,7 +32,7 @@ class NewGroupController extends State<NewGroup> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (roomID.error == null) {
|
if (roomID.error == null) {
|
||||||
VRouter.of(context).push('/rooms/${roomID.result}/invite');
|
VRouter.of(context).to('/rooms/${roomID.result}/invite');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class NewPrivateChatController extends State<NewPrivateChat> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (roomID.error == null) {
|
if (roomID.error == null) {
|
||||||
VRouter.of(context).push('/rooms/${roomID.result}');
|
VRouter.of(context).to('/rooms/${roomID.result}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ class SearchController extends State<Search> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (success.error == null) {
|
if (success.error == null) {
|
||||||
VRouter.of(context).push('/rooms/${success.result}');
|
VRouter.of(context).to('/rooms/${success.result}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ class UserBottomSheetController extends State<UserBottomSheet> {
|
|||||||
break;
|
break;
|
||||||
case 'message':
|
case 'message':
|
||||||
final roomId = await widget.user.startDirectChat();
|
final roomId = await widget.user.startDirectChat();
|
||||||
VRouter.of(widget.outerContext).push('/rooms/$roomId');
|
VRouter.of(widget.outerContext).to('/rooms/$roomId');
|
||||||
Navigator.of(context, rootNavigator: false).pop();
|
Navigator.of(context, rootNavigator: false).pop();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.close_outlined),
|
icon: Icon(Icons.close_outlined),
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
VRouter.of(context).push('/rooms/${controller.roomId}'),
|
VRouter.of(context).to('/rooms/${controller.roomId}'),
|
||||||
),
|
),
|
||||||
elevation: Theme.of(context).appBarTheme.elevation,
|
elevation: Theme.of(context).appBarTheme.elevation,
|
||||||
expandedHeight: 300.0,
|
expandedHeight: 300.0,
|
||||||
@ -313,8 +313,8 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
foregroundColor: Colors.grey,
|
foregroundColor: Colors.grey,
|
||||||
child: Icon(Icons.edit_attributes_outlined),
|
child: Icon(Icons.edit_attributes_outlined),
|
||||||
),
|
),
|
||||||
onTap: () => VRouter.of(context).push(
|
onTap: () => VRouter.of(context)
|
||||||
'/rooms/${room.id}/details/permissions'),
|
.to('/rooms/${room.id}/details/permissions'),
|
||||||
),
|
),
|
||||||
Divider(thickness: 1),
|
Divider(thickness: 1),
|
||||||
ListTile(
|
ListTile(
|
||||||
@ -341,7 +341,7 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
child: Icon(Icons.add_outlined),
|
child: Icon(Icons.add_outlined),
|
||||||
),
|
),
|
||||||
onTap: () => VRouter.of(context)
|
onTap: () => VRouter.of(context)
|
||||||
.push('/rooms/${room.id}/invite'),
|
.to('/rooms/${room.id}/invite'),
|
||||||
)
|
)
|
||||||
: Container(),
|
: Container(),
|
||||||
],
|
],
|
||||||
|
@ -23,7 +23,7 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
|||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.close_outlined),
|
icon: Icon(Icons.close_outlined),
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
VRouter.of(context).push('/rooms/${controller.roomId}'),
|
VRouter.of(context).to('/rooms/${controller.roomId}'),
|
||||||
),
|
),
|
||||||
title: Text(L10n.of(context).tapOnDeviceToVerify),
|
title: Text(L10n.of(context).tapOnDeviceToVerify),
|
||||||
bottom: PreferredSize(
|
bottom: PreferredSize(
|
||||||
|
@ -83,7 +83,7 @@ class ChatListView extends StatelessWidget {
|
|||||||
icon: Icon(Icons.search_outlined),
|
icon: Icon(Icons.search_outlined),
|
||||||
tooltip: L10n.of(context).search,
|
tooltip: L10n.of(context).search,
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
VRouter.of(context).push('/search'),
|
VRouter.of(context).to('/search'),
|
||||||
),
|
),
|
||||||
PopupMenuButton<PopupMenuAction>(
|
PopupMenuButton<PopupMenuAction>(
|
||||||
onSelected: controller.onPopupMenuSelect,
|
onSelected: controller.onPopupMenuSelect,
|
||||||
@ -295,7 +295,7 @@ class ChatListView extends StatelessWidget {
|
|||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
heroTag: 'main_fab',
|
heroTag: 'main_fab',
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
VRouter.of(context).push('/newprivatechat'),
|
VRouter.of(context).to('/newprivatechat'),
|
||||||
child: Icon(CupertinoIcons.chat_bubble),
|
child: Icon(CupertinoIcons.chat_bubble),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
|
@ -21,7 +21,7 @@ class ChatPermissionsSettingsView extends StatelessWidget {
|
|||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.close_outlined),
|
icon: Icon(Icons.close_outlined),
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
VRouter.of(context).push('/rooms/${controller.roomId}'),
|
VRouter.of(context).to('/rooms/${controller.roomId}'),
|
||||||
),
|
),
|
||||||
title: Text(L10n.of(context).editChatPermissions),
|
title: Text(L10n.of(context).editChatPermissions),
|
||||||
),
|
),
|
||||||
|
@ -90,7 +90,7 @@ class ChatView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
: () => VRouter.of(context)
|
: () => VRouter.of(context)
|
||||||
.push('/rooms/${controller.room.id}/details'),
|
.to('/rooms/${controller.room.id}/details'),
|
||||||
title: Text(
|
title: Text(
|
||||||
controller.room.getLocalizedDisplayname(
|
controller.room.getLocalizedDisplayname(
|
||||||
MatrixLocals(L10n.of(context))),
|
MatrixLocals(L10n.of(context))),
|
||||||
|
@ -122,8 +122,8 @@ class HomeserverPickerView extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
height: 64,
|
height: 64,
|
||||||
child: OutlinedButton.icon(
|
child: OutlinedButton.icon(
|
||||||
onPressed: () => VRouter.of(context)
|
onPressed: () =>
|
||||||
.push('/login'),
|
VRouter.of(context).to('/login'),
|
||||||
icon: Icon(Icons.login_outlined),
|
icon: Icon(Icons.login_outlined),
|
||||||
label: Text(L10n.of(context).login),
|
label: Text(L10n.of(context).login),
|
||||||
),
|
),
|
||||||
|
@ -24,7 +24,7 @@ class InvitationSelectionView extends StatelessWidget {
|
|||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.close_outlined),
|
icon: Icon(Icons.close_outlined),
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
VRouter.of(context).push('/rooms/${controller.roomId}'),
|
VRouter.of(context).to('/rooms/${controller.roomId}'),
|
||||||
),
|
),
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
title: DefaultAppBarSearchField(
|
title: DefaultAppBarSearchField(
|
||||||
|
@ -22,7 +22,7 @@ class NewPrivateChatView extends StatelessWidget {
|
|||||||
elevation: 0,
|
elevation: 0,
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => VRouter.of(context).push('/newgroup'),
|
onPressed: () => VRouter.of(context).to('/newgroup'),
|
||||||
child: Text(
|
child: Text(
|
||||||
L10n.of(context).createNewGroup,
|
L10n.of(context).createNewGroup,
|
||||||
style: TextStyle(color: Theme.of(context).colorScheme.secondary),
|
style: TextStyle(color: Theme.of(context).colorScheme.secondary),
|
||||||
|
@ -239,7 +239,7 @@ class SearchView extends StatelessWidget {
|
|||||||
.startDirectChat(foundProfile.userId),
|
.startDirectChat(foundProfile.userId),
|
||||||
);
|
);
|
||||||
if (roomID.error == null) {
|
if (roomID.error == null) {
|
||||||
VRouter.of(context).push('/rooms/${roomID.result}');
|
VRouter.of(context).to('/rooms/${roomID.result}');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
leading: Avatar(
|
leading: Avatar(
|
||||||
|
@ -36,7 +36,7 @@ class SettingsAccountView extends StatelessWidget {
|
|||||||
ListTile(
|
ListTile(
|
||||||
trailing: Icon(Icons.devices_other_outlined),
|
trailing: Icon(Icons.devices_other_outlined),
|
||||||
title: Text(L10n.of(context).devices),
|
title: Text(L10n.of(context).devices),
|
||||||
onTap: () => VRouter.of(context).push('devices'),
|
onTap: () => VRouter.of(context).to('devices'),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
trailing: Icon(Icons.exit_to_app_outlined),
|
trailing: Icon(Icons.exit_to_app_outlined),
|
||||||
|
@ -22,12 +22,12 @@ class SettingsChatView extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10n.of(context).changeTheme),
|
title: Text(L10n.of(context).changeTheme),
|
||||||
onTap: () => VRouter.of(context).push('style'),
|
onTap: () => VRouter.of(context).to('style'),
|
||||||
trailing: Icon(Icons.style_outlined),
|
trailing: Icon(Icons.style_outlined),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10n.of(context).emoteSettings),
|
title: Text(L10n.of(context).emoteSettings),
|
||||||
onTap: () => VRouter.of(context).push('emotes'),
|
onTap: () => VRouter.of(context).to('emotes'),
|
||||||
trailing: Icon(Icons.insert_emoticon_outlined),
|
trailing: Icon(Icons.insert_emoticon_outlined),
|
||||||
),
|
),
|
||||||
Divider(height: 1),
|
Divider(height: 1),
|
||||||
|
@ -45,7 +45,7 @@ class MultipleEmotesSettingsView extends StatelessWidget {
|
|||||||
title: Text(packName),
|
title: Text(packName),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
VRouter.of(context)
|
VRouter.of(context)
|
||||||
.push('/rooms/${room.id}/details/emotes/${keys[i]}');
|
.to('/rooms/${room.id}/details/emotes/${keys[i]}');
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -24,7 +24,7 @@ class SettingsSecurityView extends StatelessWidget {
|
|||||||
ListTile(
|
ListTile(
|
||||||
trailing: Icon(Icons.block_outlined),
|
trailing: Icon(Icons.block_outlined),
|
||||||
title: Text(L10n.of(context).ignoredUsers),
|
title: Text(L10n.of(context).ignoredUsers),
|
||||||
onTap: () => VRouter.of(context).push('ignorelist'),
|
onTap: () => VRouter.of(context).to('ignorelist'),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
trailing: Icon(Icons.security_outlined),
|
trailing: Icon(Icons.security_outlined),
|
||||||
@ -36,7 +36,7 @@ class SettingsSecurityView extends StatelessWidget {
|
|||||||
ListTile(
|
ListTile(
|
||||||
trailing: Icon(Icons.email_outlined),
|
trailing: Icon(Icons.email_outlined),
|
||||||
title: Text(L10n.of(context).passwordRecovery),
|
title: Text(L10n.of(context).passwordRecovery),
|
||||||
onTap: () => VRouter.of(context).push('3pid'),
|
onTap: () => VRouter.of(context).to('3pid'),
|
||||||
),
|
),
|
||||||
if (Matrix.of(context).client.encryption != null) ...{
|
if (Matrix.of(context).client.encryption != null) ...{
|
||||||
Divider(thickness: 1),
|
Divider(thickness: 1),
|
||||||
|
@ -40,22 +40,22 @@ class SettingsView extends StatelessWidget {
|
|||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.notifications_outlined),
|
leading: Icon(Icons.notifications_outlined),
|
||||||
title: Text(L10n.of(context).notifications),
|
title: Text(L10n.of(context).notifications),
|
||||||
onTap: () => VRouter.of(context).push('/settings/notifications'),
|
onTap: () => VRouter.of(context).to('/settings/notifications'),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.chat_bubble_outline),
|
leading: Icon(Icons.chat_bubble_outline),
|
||||||
title: Text(L10n.of(context).chat),
|
title: Text(L10n.of(context).chat),
|
||||||
onTap: () => VRouter.of(context).push('/settings/chat'),
|
onTap: () => VRouter.of(context).to('/settings/chat'),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.account_box_outlined),
|
leading: Icon(Icons.account_box_outlined),
|
||||||
title: Text(L10n.of(context).account),
|
title: Text(L10n.of(context).account),
|
||||||
onTap: () => VRouter.of(context).push('/settings/account'),
|
onTap: () => VRouter.of(context).to('/settings/account'),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.security_outlined),
|
leading: Icon(Icons.security_outlined),
|
||||||
title: Text(L10n.of(context).security),
|
title: Text(L10n.of(context).security),
|
||||||
onTap: () => VRouter.of(context).push('/settings/security'),
|
onTap: () => VRouter.of(context).to('/settings/security'),
|
||||||
),
|
),
|
||||||
Divider(thickness: 1),
|
Divider(thickness: 1),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
@ -283,7 +283,7 @@ class BackgroundPush {
|
|||||||
if (router == null) {
|
if (router == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
router.currentState.push('/rooms/$roomId');
|
router.currentState.to('/rooms/$roomId');
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
Logs().e('[Push] Failed to open room', e, s);
|
Logs().e('[Push] Failed to open room', e, s);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ abstract class PlatformInfos {
|
|||||||
child: Text(AppConfig.emojiFontName),
|
child: Text(AppConfig.emojiFontName),
|
||||||
),
|
),
|
||||||
OutlinedButton(
|
OutlinedButton(
|
||||||
onPressed: () => VRouter.of(context).push('logs'),
|
onPressed: () => VRouter.of(context).to('logs'),
|
||||||
child: Text('Logs'),
|
child: Text('Logs'),
|
||||||
),
|
),
|
||||||
SentrySwitchListTile(label: L10n.of(context).sendBugReports),
|
SentrySwitchListTile(label: L10n.of(context).sendBugReports),
|
||||||
|
@ -62,9 +62,9 @@ class UrlLauncher {
|
|||||||
// we have the room, so....just open it
|
// we have the room, so....just open it
|
||||||
if (event != null) {
|
if (event != null) {
|
||||||
VRouter.of(context)
|
VRouter.of(context)
|
||||||
.push('/rooms/${room.id}', queryParameters: {'event': event});
|
.to('/rooms/${room.id}', queryParameters: {'event': event});
|
||||||
} else {
|
} else {
|
||||||
VRouter.of(context).push('/rooms/${room.id}');
|
VRouter.of(context).to('/rooms/${room.id}');
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -89,13 +89,13 @@ class UrlLauncher {
|
|||||||
context: context,
|
context: context,
|
||||||
future: () => Future.delayed(const Duration(seconds: 2)));
|
future: () => Future.delayed(const Duration(seconds: 2)));
|
||||||
if (event != null) {
|
if (event != null) {
|
||||||
VRouter.of(context).push('/rooms/${response.result}/$event');
|
VRouter.of(context).to('/rooms/${response.result}/$event');
|
||||||
} else {
|
} else {
|
||||||
VRouter.of(context).push('/rooms/${response.result}');
|
VRouter.of(context).to('/rooms/${response.result}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
VRouter.of(context).push('/search', queryParameters: {
|
VRouter.of(context).to('/search', queryParameters: {
|
||||||
if (roomIdOrAlias != null) 'query': roomIdOrAlias
|
if (roomIdOrAlias != null) 'query': roomIdOrAlias
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ class UrlLauncher {
|
|||||||
);
|
);
|
||||||
var roomId = matrix.client.getDirectChatFromUserId(user.id);
|
var roomId = matrix.client.getDirectChatFromUserId(user.id);
|
||||||
if (roomId != null) {
|
if (roomId != null) {
|
||||||
VRouter.of(context).push('/rooms/$roomId');
|
VRouter.of(context).to('/rooms/$roomId');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ class UrlLauncher {
|
|||||||
.result;
|
.result;
|
||||||
|
|
||||||
if (roomId != null) {
|
if (roomId != null) {
|
||||||
VRouter.of(context).push('/rooms/$roomId');
|
VRouter.of(context).to('/rooms/$roomId');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||||||
final success = await showFutureLoadingDialog(
|
final success = await showFutureLoadingDialog(
|
||||||
context: context, future: () => widget.room.leave());
|
context: context, future: () => widget.room.leave());
|
||||||
if (success.error == null) {
|
if (success.error == null) {
|
||||||
VRouter.of(context).push('/rooms');
|
VRouter.of(context).to('/rooms');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -95,7 +95,7 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||||||
widget.room.setPushRuleState(PushRuleState.notify));
|
widget.room.setPushRuleState(PushRuleState.notify));
|
||||||
break;
|
break;
|
||||||
case 'details':
|
case 'details':
|
||||||
VRouter.of(context).push('/rooms/${widget.room.id}/details');
|
VRouter.of(context).to('/rooms/${widget.room.id}/details');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -102,7 +102,7 @@ class _ContactListTile extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
)
|
)
|
||||||
: null),
|
: null),
|
||||||
onTap: () => VRouter.of(context).push(
|
onTap: () => VRouter.of(context).to(
|
||||||
'/rooms/${Matrix.of(context).client.getDirectChatFromUserId(contact.senderId)}'),
|
'/rooms/${Matrix.of(context).client.getDirectChatFromUserId(contact.senderId)}'),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -21,7 +21,7 @@ class _EncryptionButtonState extends State<EncryptionButton> {
|
|||||||
|
|
||||||
void _enableEncryptionAction() async {
|
void _enableEncryptionAction() async {
|
||||||
if (widget.room.encrypted) {
|
if (widget.room.encrypted) {
|
||||||
VRouter.of(context).push('/rooms/${widget.room.id}/encryption');
|
VRouter.of(context).to('/rooms/${widget.room.id}/encryption');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (widget.room.joinRules == JoinRules.public) {
|
if (widget.room.joinRules == JoinRules.public) {
|
||||||
|
@ -9,7 +9,7 @@ class LoadingView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (Matrix.of(context).loginState != null) {
|
if (Matrix.of(context).loginState != null) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback(
|
WidgetsBinding.instance.addPostFrameCallback(
|
||||||
(_) => context.vRouter.push(
|
(_) => VRouter.of(context).to(
|
||||||
Matrix.of(context).loginState == LoginState.logged
|
Matrix.of(context).loginState == LoginState.logged
|
||||||
? '/rooms'
|
? '/rooms'
|
||||||
: '/home',
|
: '/home',
|
||||||
|
@ -105,7 +105,7 @@ class ChatListItem extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
Matrix.of(context).shareContent = null;
|
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),
|
future: () => _joinRoomAndWait(context),
|
||||||
);
|
);
|
||||||
if (success.error == null) {
|
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);
|
.contains(widget.router.currentState.url);
|
||||||
if (widget.router.currentState.url == '/' ||
|
if (widget.router.currentState.url == '/' ||
|
||||||
(state == LoginState.logged) == isInLoginRoutes) {
|
(state == LoginState.logged) == isInLoginRoutes) {
|
||||||
widget.router.currentState.push(
|
widget.router.currentState.to(
|
||||||
loginState == LoginState.logged ? '/rooms' : '/home',
|
loginState == LoginState.logged ? '/rooms' : '/home',
|
||||||
queryParameters: widget.router.currentState.queryParameters,
|
queryParameters: widget.router.currentState.queryParameters,
|
||||||
);
|
);
|
||||||
|
@ -589,7 +589,7 @@ packages:
|
|||||||
name: matrix
|
name: matrix
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.5"
|
version: "0.1.6"
|
||||||
matrix_api_lite:
|
matrix_api_lite:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -1170,7 +1170,7 @@ packages:
|
|||||||
name: unifiedpush
|
name: unifiedpush
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.6"
|
version: "1.0.3"
|
||||||
universal_html:
|
universal_html:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -1268,7 +1268,7 @@ packages:
|
|||||||
name: vrouter
|
name: vrouter
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.4+16"
|
version: "1.2.0+4"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -41,7 +41,7 @@ dependencies:
|
|||||||
image_picker: ^0.7.4
|
image_picker: ^0.7.4
|
||||||
intl: any
|
intl: any
|
||||||
localstorage: ^4.0.0+1
|
localstorage: ^4.0.0+1
|
||||||
matrix: ^0.1.5
|
matrix: ^0.1.6
|
||||||
mime_type: ^1.0.0
|
mime_type: ^1.0.0
|
||||||
native_imaging:
|
native_imaging:
|
||||||
git:
|
git:
|
||||||
@ -64,7 +64,7 @@ dependencies:
|
|||||||
unifiedpush: ^1.0.2
|
unifiedpush: ^1.0.2
|
||||||
universal_html: ^2.0.8
|
universal_html: ^2.0.8
|
||||||
url_launcher: ^6.0.3
|
url_launcher: ^6.0.3
|
||||||
vrouter: ^1.1.4+16
|
vrouter: ^1.2.0+4
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
dapackages: ^1.6.0
|
dapackages: ^1.6.0
|
||||||
|
Loading…
Reference in New Issue
Block a user