TF-3278 Handle open app via deep link at MailboxDashboard screen
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tmail_ui_user/features/base/base_bindings.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/network/authentication_client/authentication_client_base.dart';
|
||||
@@ -38,9 +37,6 @@ class TwakeWelcomeBindings extends BaseBindings {
|
||||
Get.find<AccountRepository>(),
|
||||
Get.find<CredentialRepository>(),
|
||||
));
|
||||
if (PlatformInfo.isMobile) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
+25
-11
@@ -23,6 +23,7 @@ import 'package:tmail_ui_user/features/starting_page/domain/usecase/sign_in_twak
|
||||
import 'package:tmail_ui_user/features/starting_page/domain/usecase/sign_up_twake_workplace_interactor.dart';
|
||||
import 'package:tmail_ui_user/main/deep_links/deep_link_data.dart';
|
||||
import 'package:tmail_ui_user/main/deep_links/deep_links_manager.dart';
|
||||
import 'package:tmail_ui_user/main/deep_links/open_app_deep_link_data.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
import 'package:tmail_ui_user/main/routes/app_routes.dart';
|
||||
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
|
||||
@@ -61,16 +62,21 @@ class TwakeWelcomeController extends ReloadableController {
|
||||
|
||||
void _handlePendingDeepLinkDataStream(DeepLinkData? deepLinkData) {
|
||||
log('TwakeWelcomeController::_handlePendingDeepLinkDataStream:DeepLinkData = $deepLinkData');
|
||||
if (deepLinkData == null) return;
|
||||
|
||||
if (currentContext != null) {
|
||||
SmartDialog.showLoading(msg: AppLocalizations.of(currentContext!).loadingPleaseWait);
|
||||
}
|
||||
|
||||
_deepLinksManager?.handleDeepLinksWhenAppOnForegroundNotSignedIn(
|
||||
_deepLinksManager?.handleDeepLinksWhenAppRunning(
|
||||
deepLinkData: deepLinkData,
|
||||
onSuccessCallback: _handleAutoSignInViaDeepLinkSuccess,
|
||||
onFailureCallback: SmartDialog.dismiss,
|
||||
onSuccessCallback: (deepLinkData) {
|
||||
if (deepLinkData is! OpenAppDeepLinkData) return;
|
||||
|
||||
if (currentContext != null) {
|
||||
SmartDialog.showLoading(msg: AppLocalizations.of(currentContext!).loadingPleaseWait);
|
||||
}
|
||||
|
||||
_deepLinksManager?.autoSignInViaDeepLink(
|
||||
openAppDeepLinkData: deepLinkData,
|
||||
onAutoSignInSuccessCallback: _handleAutoSignInViaDeepLinkSuccess,
|
||||
onFailureCallback: SmartDialog.dismiss,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -107,7 +113,8 @@ class TwakeWelcomeController extends ReloadableController {
|
||||
oidcConfiguration: OIDCConfiguration(
|
||||
authority: AppConfig.saasRegistrationUrl,
|
||||
clientId: OIDCConstant.clientId,
|
||||
scopes: AppConfig.oidcScopes
|
||||
scopes: AppConfig.oidcScopes,
|
||||
isTWP: true,
|
||||
)
|
||||
));
|
||||
}
|
||||
@@ -127,7 +134,8 @@ class TwakeWelcomeController extends ReloadableController {
|
||||
oidcConfiguration: OIDCConfiguration(
|
||||
authority: AppConfig.saasRegistrationUrl,
|
||||
clientId: OIDCConstant.clientId,
|
||||
scopes: AppConfig.oidcScopes
|
||||
scopes: AppConfig.oidcScopes,
|
||||
isTWP: true,
|
||||
)
|
||||
));
|
||||
}
|
||||
@@ -178,6 +186,12 @@ class TwakeWelcomeController extends ReloadableController {
|
||||
toastManager.showMessageFailure(failure);
|
||||
}
|
||||
|
||||
@override
|
||||
void handleUrgentExceptionOnMobile({Failure? failure, Exception? exception}) {
|
||||
SmartDialog.dismiss();
|
||||
super.handleUrgentExceptionOnMobile(failure: failure, exception: exception);
|
||||
}
|
||||
|
||||
void _synchronizeTokenAndGetSession({
|
||||
required Uri baseUri,
|
||||
required TokenOIDC tokenOIDC,
|
||||
|
||||
Reference in New Issue
Block a user