Skip to content

Commit 162499e

Browse files
committed
wip
1 parent c14ac5e commit 162499e

File tree

3 files changed

+206
-198
lines changed

3 files changed

+206
-198
lines changed

lib/cubit/account_cubit.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ class AccountCubit extends Cubit<AccountState> {
392392
return false;
393393
}
394394

395-
Future<void> changeEmailAddress(String password, String newEmailAddress) async {
395+
Future<bool> changeEmailAddress(String password, String newEmailAddress) async {
396396
l.d('starting the changeEmailAddress procedure');
397397
User user = currentUser;
398398
try {
@@ -411,6 +411,7 @@ class AccountCubit extends Cubit<AccountState> {
411411
//TODO: verify that we can only get here if Vault is already locked. Throw exception earlier if we can detect that state?
412412
emit(AccountChosen(newUser));
413413
//await BlocProvider.of<AccountCubit>(context).forgetUser(vc.signout);
414+
return true;
414415
} on KeeLoginFailedMITMException {
415416
rethrow;
416417
} on KeeLoginRequiredException {
@@ -448,7 +449,7 @@ class AccountCubit extends Cubit<AccountState> {
448449
// }
449450
// emit(AccountAuthenticationBypassed(user));
450451
}
451-
return;
452+
return false;
452453
}
453454

454455
Future<void> signout() async {

lib/cubit/vault_cubit.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,8 +831,8 @@ class VaultCubit extends Cubit<VaultState> {
831831
}
832832

833833
if (currentVaultFile == null || (!currentVaultFile!.files.current.isDirty && !entryBeingEdited)) {
834-
signout();
835834
_accountCubit.emailUnverified();
835+
signout();
836836
} else {
837837
emitError(
838838
'Your email address has not yet been verified. Please check your emails and do that now. If you want us to resend the email, save your vault then sign out and back in again.',

0 commit comments

Comments
 (0)