TF-3715 Thread Detail Fix concurrent modification during iteration

This commit is contained in:
DatDang
2025-06-03 09:36:39 +07:00
committed by Dat H. Pham
parent 9fca7acbba
commit e61ee911de
3 changed files with 8 additions and 16 deletions
@@ -399,12 +399,12 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
action.presentationEmail,
);
} else if (action is CloseEmailInThreadDetailAction) {
if (action.emailId != _currentEmailId) return;
if (_currentEmailId == null) return;
closeEmailView(context: currentContext);
for (var worker in obxListeners) {
worker.dispose();
}
Get.delete<SingleEmailController>(tag: _currentEmailId?.id.value);
Get.delete<SingleEmailController>(tag: _currentEmailId!.id.value);
}
}));