Fix when we select email frequently, sometime, email view displays not selected email

This commit is contained in:
dab246
2025-09-26 11:17:57 +07:00
committed by Dat H. Pham
parent 7674353735
commit 2baf754cc1
@@ -202,6 +202,10 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
Stream<Either<Failure, Success>> get downloadProgressState => _downloadProgressStateController.stream;
PresentationEmail? get currentEmail {
if (PlatformInfo.isMobile &&
_threadDetailController?.isThreadDetailEnabled != true) {
return mailboxDashBoardController.selectedEmail.value;
}
return _currentEmailId == null
? null
: _threadDetailController?.emailIdsPresentation[_currentEmailId];