TF-3290 Only show reconnection confirm dialog when composer is opened

This commit is contained in:
dab246
2024-12-12 15:51:03 +07:00
committed by Dat H. Pham
parent 6e59633bf6
commit b83e092e47
19 changed files with 141 additions and 50 deletions
@@ -21,6 +21,7 @@ import 'package:tmail_ui_user/main/utils/app_config.dart';
import 'package:tmail_ui_user/main/utils/email_receive_manager.dart';
import 'package:tmail_ui_user/main/utils/ios_notification_manager.dart';
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
import 'package:uuid/uuid.dart';
class CoreBindings extends Bindings {
@@ -76,6 +77,7 @@ class CoreBindings extends Bindings {
Get.put(IOSNotificationManager());
}
Get.put(PreviewEmlFileUtils());
Get.put(TwakeAppManager());
}
void _bindingIsolate() {
@@ -4149,13 +4149,6 @@ class AppLocalizations {
);
}
String get dialogMessageSessionHasExpired {
return Intl.message(
'The current session has expired. Please reconnect to the server',
name: 'dialogMessageSessionHasExpired',
);
}
String get sMimeGoodSignatureMessage {
return Intl.message(
'The authenticity of this message had been verified with SMime signature.',
@@ -4343,6 +4336,14 @@ class AppLocalizations {
);
}
String get messageWarningDialogWhenExpiredOIDCTokenAndReconnection {
return Intl.message(
'Your session expired. We need to take you back to the login page in order to refresh it. You might want to save the email you are currently editing before we do so.',
name: 'messageWarningDialogWhenExpiredOIDCTokenAndReconnection',
);
}
String get replyToList {
return Intl.message(
'Reply to list',
+20
View File
@@ -0,0 +1,20 @@
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/model/composer_overlay_state.dart';
class TwakeAppManager {
ComposerOverlayState? _composerOverlayState;
void openComposerOnWeb() =>
_composerOverlayState = ComposerOverlayState.active;
void closeComposerOnWeb() {
_composerOverlayState = ComposerOverlayState.inActive;
_composerOverlayState = null;
}
bool get isComposerOpened =>
_composerOverlayState == ComposerOverlayState.active;
void dispose() {
_composerOverlayState = null;
}
}