TF-2387 Add TwakeWelcome page the first time app launch

This commit is contained in:
dab246
2024-01-02 19:07:19 +07:00
committed by Dat H. Pham
parent 064692d8c3
commit 1393e2cd07
10 changed files with 152 additions and 4 deletions
+8 -4
View File
@@ -407,16 +407,20 @@ abstract class BaseController extends GetxController
FirebaseCapability.fcmIdentifier.isSupported(session, accountId) && AppConfig.fcmAvailable;
void goToLogin() {
if (Get.currentRoute != AppRoutes.login) {
if (PlatformInfo.isMobile) {
navigateToTwakeWelcomePage();
} else if (Get.currentRoute != AppRoutes.login) {
pushAndPopAll(
AppRoutes.login,
arguments: LoginArguments(
PlatformInfo.isMobile ? LoginFormType.dnsLookupForm : LoginFormType.none
)
arguments: LoginArguments(LoginFormType.none)
);
}
}
void navigateToTwakeWelcomePage() {
popAndPush(AppRoutes.twakeWelcome);
}
void logout(Session? session, AccountId? accountId) async {
if (session == null || accountId == null) {
await clearDataAndGoToLoginPage();