add loading when using advance search
This commit is contained in:
@@ -157,6 +157,8 @@ class SearchController extends BaseController {
|
||||
bool isSearchActive() =>
|
||||
searchState.value.searchStatus == SearchStatus.ACTIVE;
|
||||
|
||||
bool isAdvanceSearchActive() => isAdvancedSearchHasApply.isTrue;
|
||||
|
||||
void enableSearch() {
|
||||
searchState.value = searchState.value.enableSearchState();
|
||||
}
|
||||
|
||||
@@ -803,6 +803,9 @@ class ThreadController extends BaseController {
|
||||
|
||||
bool isSearchActive() => searchController.isSearchActive();
|
||||
|
||||
bool isAdvanceSearchActive() => searchController.isAdvanceSearchActive();
|
||||
|
||||
|
||||
bool get isAllSearchInActive => !searchController.isSearchActive() &&
|
||||
searchController.isAdvancedSearchViewOpen.isFalse;
|
||||
|
||||
|
||||
@@ -473,7 +473,7 @@ class ThreadView extends GetWidget<ThreadController> with AppLoaderMixin,
|
||||
return Obx(() => controller.viewState.value.fold(
|
||||
(failure) => const SizedBox.shrink(),
|
||||
(success) {
|
||||
if (controller.isSearchActive()) {
|
||||
if (controller.isSearchActive() || controller.isAdvanceSearchActive()) {
|
||||
return success is SearchingState
|
||||
? Padding(padding: const EdgeInsets.symmetric(vertical: 16), child: loadingWidget)
|
||||
: const SizedBox.shrink();
|
||||
|
||||
Reference in New Issue
Block a user