Consistency
This commit is contained in:
committed by
AmanRajSinghMourya
parent
5dd5756a41
commit
97b36681dc
@@ -13,10 +13,10 @@ import 'package:ente_utils/platform_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DeleteAccountPage extends StatelessWidget {
|
||||
final BaseConfiguration configuration;
|
||||
final BaseConfiguration config;
|
||||
|
||||
const DeleteAccountPage(
|
||||
this.configuration, {
|
||||
this.config, {
|
||||
super.key,
|
||||
});
|
||||
|
||||
@@ -169,9 +169,9 @@ class DeleteAccountPage extends StatelessWidget {
|
||||
final decryptChallenge = CryptoUtil.openSealSync(
|
||||
CryptoUtil.base642bin(response.encryptedChallenge),
|
||||
CryptoUtil.base642bin(
|
||||
configuration.getKeyAttributes()!.publicKey,
|
||||
config.getKeyAttributes()!.publicKey,
|
||||
),
|
||||
configuration.getSecretKey()!,
|
||||
config.getSecretKey()!,
|
||||
);
|
||||
final challengeResponseStr = utf8.decode(decryptChallenge);
|
||||
await UserService.instance.deleteAccount(context, challengeResponseStr);
|
||||
|
||||
@@ -15,10 +15,14 @@ import 'package:flutter/material.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
class PasswordReentryPage extends StatefulWidget {
|
||||
final BaseHomePage homePage;
|
||||
final BaseConfiguration config;
|
||||
final BaseHomePage homePage;
|
||||
|
||||
const PasswordReentryPage(this.homePage, this.config, {super.key});
|
||||
const PasswordReentryPage(
|
||||
this.config,
|
||||
this.homePage, {
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
State<PasswordReentryPage> createState() => _PasswordReentryPageState();
|
||||
@@ -122,7 +126,10 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
return RecoveryPage(widget.homePage, widget.config);
|
||||
return RecoveryPage(
|
||||
widget.config,
|
||||
widget.homePage,
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
@@ -272,8 +279,8 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
return RecoveryPage(
|
||||
widget.homePage,
|
||||
widget.config,
|
||||
widget.homePage,
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -8,10 +8,10 @@ import 'package:ente_ui/utils/toast_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RecoveryPage extends StatefulWidget {
|
||||
final BaseHomePage homePage;
|
||||
final BaseConfiguration config;
|
||||
final BaseHomePage homePage;
|
||||
|
||||
const RecoveryPage(this.homePage, this.config, {super.key});
|
||||
const RecoveryPage(this.config, this.homePage, {super.key});
|
||||
|
||||
@override
|
||||
State<RecoveryPage> createState() => _RecoveryPageState();
|
||||
|
||||
@@ -348,7 +348,10 @@ class UserService {
|
||||
Navigator.of(context).pushAndRemoveUntil(
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
return PasswordReentryPage(_homePage, _config);
|
||||
return PasswordReentryPage(
|
||||
_config,
|
||||
_homePage,
|
||||
);
|
||||
},
|
||||
),
|
||||
(route) => route.isFirst,
|
||||
@@ -426,9 +429,15 @@ class UserService {
|
||||
await _saveConfiguration(response);
|
||||
if (_config.getEncryptedToken() != null) {
|
||||
if (isResettingPasswordScreen) {
|
||||
page = RecoveryPage(_homePage, _config);
|
||||
page = RecoveryPage(
|
||||
_config,
|
||||
_homePage,
|
||||
);
|
||||
} else {
|
||||
page = PasswordReentryPage(_homePage, _config);
|
||||
page = PasswordReentryPage(
|
||||
_config,
|
||||
_homePage,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
page = PasswordEntryPage(
|
||||
@@ -837,7 +846,10 @@ class UserService {
|
||||
Navigator.of(context).pushAndRemoveUntil(
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
return PasswordReentryPage(_homePage, _config);
|
||||
return PasswordReentryPage(
|
||||
_config,
|
||||
_homePage,
|
||||
);
|
||||
},
|
||||
),
|
||||
(route) => route.isFirst,
|
||||
@@ -1001,7 +1013,10 @@ class UserService {
|
||||
Navigator.of(context).pushAndRemoveUntil(
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
return PasswordReentryPage(_homePage, _config);
|
||||
return PasswordReentryPage(
|
||||
_config,
|
||||
_homePage,
|
||||
);
|
||||
},
|
||||
),
|
||||
(route) => route.isFirst,
|
||||
|
||||
Reference in New Issue
Block a user