TF-3834 Persist sort order when reload page

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-07-30 10:40:22 +07:00
committed by Dat H. Pham
parent 1293c1a997
commit 7aa7223049
2 changed files with 9 additions and 3 deletions
@@ -1427,7 +1427,10 @@ class ThreadController extends BaseController with EmailActionController {
searchController.enableSearch();
if (searchQuery != null) {
searchController.updateTextSearch(searchQuery.value);
searchController.updateFilterEmail(textOption: Some(searchQuery));
searchController.updateFilterEmail(
textOption: Some(searchQuery),
sortOrderTypeOption: Some(mailboxDashBoardController.currentSortOrder),
);
if (currentContext != null) {
FocusScope.of(currentContext!).unfocus();
}
@@ -1442,7 +1445,10 @@ class ThreadController extends BaseController with EmailActionController {
dispatchState(Right(SearchingState()));
searchController.enableSearch();
searchController.updateTextSearch(searchQuery.value);
searchController.updateFilterEmail(textOption: Some(searchQuery));
searchController.updateFilterEmail(
textOption: Some(searchQuery),
sortOrderTypeOption: Some(mailboxDashBoardController.currentSortOrder),
);
if (currentContext != null) {
FocusScope.of(currentContext!).unfocus();
}