Skip to content

Commit 952501e

Browse files
committed
TF-4268 Reset _baseUrl on each load to prevent stale URL caching across accounts.
1 parent 8b5fbbf commit 952501e

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

lib/features/mailbox_dashboard/presentation/controller/linagora_ecosystem_controller.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import 'package:tmail_ui_user/main/routes/route_navigation.dart';
1212

1313
class LinagoraEcosystemController with SentryEcosystemMixin {
1414
GetLinagoraEcosystemInteractor? _getLinagoraEcosystemInteractor;
15-
String? _baseUrl;
1615

1716
final BaseController _baseController;
1817

@@ -33,10 +32,10 @@ class LinagoraEcosystemController with SentryEcosystemMixin {
3332
}
3433

3534
void _loadLinagoraEcosystem() {
36-
_baseUrl ??= _baseController.dynamicUrlInterceptors.jmapUrl;
35+
final baseUrl = _baseController.dynamicUrlInterceptors.jmapUrl;
3736

38-
if (_baseUrl?.trimmed.isNotEmpty != true) {
39-
logWarning('LinagoraEcosystemController:_loadLinagoraEcosystem: _baseUrl is empty');
37+
if (baseUrl == null || baseUrl.trimmed.isEmpty) {
38+
logWarning('LinagoraEcosystemController:_loadLinagoraEcosystem: baseUrl is empty');
4039
return;
4140
}
4241

@@ -46,7 +45,7 @@ class LinagoraEcosystemController with SentryEcosystemMixin {
4645
}
4746

4847
_baseController.consumeState(
49-
_getLinagoraEcosystemInteractor!.execute(_baseUrl!),
48+
_getLinagoraEcosystemInteractor!.execute(baseUrl),
5049
);
5150
}
5251

0 commit comments

Comments
 (0)