🐛 Fix sticker filter didn't apply as expected in marketplace, close #219
This commit is contained in:
@@ -91,7 +91,6 @@ class MarketplaceStickersScreen extends HookConsumerWidget {
|
|||||||
if (query.value.query == null || query.value.query!.isEmpty) {
|
if (query.value.query == null || query.value.query!.isEmpty) {
|
||||||
searchController.clear();
|
searchController.clear();
|
||||||
}
|
}
|
||||||
notifier.applyFilter(query.value);
|
|
||||||
return null;
|
return null;
|
||||||
}, [query]);
|
}, [query]);
|
||||||
|
|
||||||
@@ -109,6 +108,7 @@ class MarketplaceStickersScreen extends HookConsumerWidget {
|
|||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
query.value = query.value.copyWith(byUsage: !query.value.byUsage);
|
query.value = query.value.copyWith(byUsage: !query.value.byUsage);
|
||||||
|
notifier.applyFilter(query.value);
|
||||||
},
|
},
|
||||||
icon: query.value.byUsage
|
icon: query.value.byUsage
|
||||||
? const Icon(Symbols.local_fire_department)
|
? const Icon(Symbols.local_fire_department)
|
||||||
@@ -141,6 +141,7 @@ class MarketplaceStickersScreen extends HookConsumerWidget {
|
|||||||
icon: const Icon(Symbols.close),
|
icon: const Icon(Symbols.close),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
query.value = query.value.copyWith(query: null);
|
query.value = query.value.copyWith(query: null);
|
||||||
|
notifier.applyFilter(query.value);
|
||||||
searchController.clear();
|
searchController.clear();
|
||||||
focusNode.unfocus();
|
focusNode.unfocus();
|
||||||
},
|
},
|
||||||
@@ -153,11 +154,13 @@ class MarketplaceStickersScreen extends HookConsumerWidget {
|
|||||||
const Duration(milliseconds: 500),
|
const Duration(milliseconds: 500),
|
||||||
() {
|
() {
|
||||||
query.value = query.value.copyWith(query: value);
|
query.value = query.value.copyWith(query: value);
|
||||||
|
notifier.applyFilter(query.value);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
onSubmitted: (value) {
|
onSubmitted: (value) {
|
||||||
query.value = query.value.copyWith(query: value);
|
query.value = query.value.copyWith(query: value);
|
||||||
|
notifier.applyFilter(query.value);
|
||||||
focusNode.unfocus();
|
focusNode.unfocus();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ class PaginationList<T> extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
key: const ValueKey('loading'),
|
key: const ValueKey('loading'),
|
||||||
child: ListView(children: content),
|
child: ListView(padding: padding, children: content),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user