chore: Follow up router fixes
This commit is contained in:
parent
0c69ce0552
commit
b7dac8365a
8 changed files with 54 additions and 67 deletions
|
|
@ -9,7 +9,7 @@ import 'package:fluffychat/widgets/matrix.dart';
|
|||
|
||||
extension UiaRequestManager on MatrixState {
|
||||
Future uiaRequestHandler(UiaRequest uiaRequest) async {
|
||||
final l10n = L10n.of(navigatorContext)!;
|
||||
final l10n = L10n.of(context)!;
|
||||
try {
|
||||
if (uiaRequest.state != UiaRequestState.waitForUser ||
|
||||
uiaRequest.nextStages.isEmpty) {
|
||||
|
|
@ -22,7 +22,7 @@ extension UiaRequestManager on MatrixState {
|
|||
case AuthenticationTypes.password:
|
||||
final input = cachedPassword ??
|
||||
(await showTextInputDialog(
|
||||
context: navigatorContext,
|
||||
context: context,
|
||||
title: l10n.pleaseEnterYourPassword,
|
||||
okLabel: l10n.ok,
|
||||
cancelLabel: l10n.cancel,
|
||||
|
|
@ -49,7 +49,7 @@ extension UiaRequestManager on MatrixState {
|
|||
case AuthenticationTypes.emailIdentity:
|
||||
if (currentThreepidCreds == null) {
|
||||
return uiaRequest.cancel(
|
||||
UiaException(L10n.of(navigatorContext)!.serverRequiresEmail),
|
||||
UiaException(L10n.of(context)!.serverRequiresEmail),
|
||||
);
|
||||
}
|
||||
final auth = AuthenticationThreePidCreds(
|
||||
|
|
@ -63,7 +63,7 @@ extension UiaRequestManager on MatrixState {
|
|||
if (OkCancelResult.ok ==
|
||||
await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: navigatorContext,
|
||||
context: context,
|
||||
title: l10n.weSentYouAnEmail,
|
||||
message: l10n.pleaseClickOnLink,
|
||||
okLabel: l10n.iHaveClickedOnLink,
|
||||
|
|
@ -88,7 +88,7 @@ extension UiaRequestManager on MatrixState {
|
|||
await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
message: l10n.pleaseFollowInstructionsOnWeb,
|
||||
context: navigatorContext,
|
||||
context: context,
|
||||
okLabel: l10n.next,
|
||||
cancelLabel: l10n.cancel,
|
||||
)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue