Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
(fix/splah_account_validation) (#221)
Browse files Browse the repository at this point in the history
Co-authored-by: Piotr FLEURY <piotr.fleury@gmail.com>
  • Loading branch information
zohra051 and PiotrFLEURY authored Aug 26, 2020
1 parent 0338474 commit 9367540
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Progress_bar : Progress bar value error
- openedListPage and new_list : change ui
- list Creation : User don't have to use the creation list page to create a list anymore
- user must validate his account before access to the app
- Authentication path : The path to the authentication page is now /authentication

### Security
Expand Down
11 changes: 9 additions & 2 deletions lib/pages/splash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ class SplashPageState extends State<SplashPage>
autologin = true;
}
if (_userService.user != null) {
Navigator.of(context).pushNamedAndRemoveUntil(
"/mainPage", (Route<dynamic> route) => false);
openMainPage();
}
return autologin;
} else {
Expand All @@ -121,4 +120,12 @@ class SplashPageState extends State<SplashPage>
}
return false;
}

void openMainPage() {
(_userService.user.isEmailVerified == false)
? Navigator.of(context).pushNamedAndRemoveUntil(
'/profile', (Route<dynamic> route) => false)
: Navigator.of(context).pushNamedAndRemoveUntil(
'/mainPage', (Route<dynamic> route) => false);
}
}

0 comments on commit 9367540

Please sign in to comment.