TF-2771 Fix show list email when user changed filter or sort order on iOS
This commit is contained in:
@@ -189,11 +189,7 @@ class SearchEmailController extends BaseController
|
||||
}
|
||||
|
||||
void _initializeTextInputFocus() {
|
||||
textInputSearchFocus.addListener(() {
|
||||
if (textInputSearchFocus.hasFocus) {
|
||||
searchIsRunning.value = false;
|
||||
}
|
||||
});
|
||||
textInputSearchFocus.addListener(_onSearchTextInputListener);
|
||||
}
|
||||
|
||||
void _initWorkerListener() {
|
||||
@@ -235,6 +231,12 @@ class SearchEmailController extends BaseController
|
||||
);
|
||||
}
|
||||
|
||||
void _onSearchTextInputListener() {
|
||||
if (textInputSearchFocus.hasFocus) {
|
||||
searchIsRunning.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
void _refreshEmailChanges() {
|
||||
if (searchIsRunning.isTrue && session != null && accountId != null) {
|
||||
final limit = listResultSearch.isNotEmpty
|
||||
@@ -308,6 +310,7 @@ class SearchEmailController extends BaseController
|
||||
|
||||
void _searchEmailAction(BuildContext context) {
|
||||
KeyboardUtils.hideKeyboard(context);
|
||||
textInputSearchFocus.unfocus();
|
||||
|
||||
if (session != null && accountId != null) {
|
||||
canSearchMore = true;
|
||||
@@ -888,7 +891,9 @@ class SearchEmailController extends BaseController
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
textInputSearchFocus.removeListener(_onSearchTextInputListener);
|
||||
textInputSearchController.dispose();
|
||||
textInputSearchFocus.dispose();
|
||||
resultSearchScrollController.dispose();
|
||||
_deBouncerTime.cancel();
|
||||
dashBoardViewStateWorker.dispose();
|
||||
|
||||
@@ -180,6 +180,8 @@ class SearchEmailView extends GetWidget<SearchEmailController>
|
||||
padding: const EdgeInsets.only(right: 8),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
|
||||
if (filter == QuickSearchFilter.hasAttachment) {
|
||||
controller.selectQuickSearchFilter(context, filter);
|
||||
} else if (controller.responsiveUtils.isMobile(context)) {
|
||||
@@ -204,6 +206,8 @@ class SearchEmailView extends GetWidget<SearchEmailController>
|
||||
},
|
||||
onTapDown: (detail) {
|
||||
if (!controller.responsiveUtils.isMobile(context)) {
|
||||
FocusScope.of(context).unfocus();
|
||||
|
||||
final screenSize = MediaQuery.of(context).size;
|
||||
final offset = detail.globalPosition;
|
||||
final position = RelativeRect.fromLTRB(
|
||||
|
||||
Reference in New Issue
Block a user