parent
81c354e652
commit
3fa9c65a2b
24 changed files with 68 additions and 30 deletions
|
|
@ -106,12 +106,12 @@ class ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||
switch (choice) {
|
||||
case 'leave':
|
||||
final confirmed = await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context)!.areYouSure,
|
||||
okLabel: L10n.of(context)!.ok,
|
||||
cancelLabel: L10n.of(context)!.cancel,
|
||||
message: L10n.of(context)!.archiveRoomDescription,
|
||||
isDestructiveAction: true,
|
||||
);
|
||||
if (confirmed == OkCancelResult.ok) {
|
||||
final success = await showFutureLoadingDialog(
|
||||
|
|
|
|||
|
|
@ -52,10 +52,16 @@ class FluffyChatApp extends StatelessWidget {
|
|||
builder: (context, child) => AppLockWidget(
|
||||
pincode: pincode,
|
||||
clients: clients,
|
||||
child: Matrix(
|
||||
clients: clients,
|
||||
store: store,
|
||||
child: testWidget ?? child,
|
||||
// Need a navigator above the Matrix widget for
|
||||
// displaying dialogs
|
||||
child: Navigator(
|
||||
onGenerateRoute: (_) => MaterialPageRoute(
|
||||
builder: (_) => Matrix(
|
||||
clients: clients,
|
||||
store: store,
|
||||
child: testWidget ?? child,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -71,8 +71,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
|
||||
BackgroundPush? backgroundPush;
|
||||
|
||||
late BuildContext navigatorContext;
|
||||
|
||||
Client get client {
|
||||
if (widget.clients.isEmpty) {
|
||||
widget.clients.add(getLoginClient());
|
||||
|
|
@ -313,8 +311,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
};
|
||||
request.onUpdate = null;
|
||||
hidPopup = true;
|
||||
|
||||
await KeyVerificationDialog(request: request).show(navigatorContext);
|
||||
await KeyVerificationDialog(request: request).show(context);
|
||||
});
|
||||
onLoginStateChanged[name] ??= c.onLoginStateChanged.stream.listen((state) {
|
||||
final loggedInWithMultipleClients = widget.clients.length > 1;
|
||||
|
|
@ -325,7 +322,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
_cancelSubs(c.clientName);
|
||||
widget.clients.remove(c);
|
||||
ClientManager.removeClientNameFromStore(c.clientName, store);
|
||||
ScaffoldMessenger.of(navigatorContext).showSnackBar(
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(L10n.of(context)!.oneClientLoggedOut),
|
||||
),
|
||||
|
|
@ -385,7 +382,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
onFcmError: (errorMsg, {Uri? link}) async {
|
||||
final result = await showOkCancelAlertDialog(
|
||||
barrierDismissible: true,
|
||||
context: navigatorContext,
|
||||
context: context,
|
||||
title: L10n.of(context)!.pushNotificationsNotAvailable,
|
||||
message: errorMsg,
|
||||
fullyCapitalizedForMaterial: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue