feat(market): saved searches with in-app alerts (Wallapop-style)
Save the current market search (query + facets) and get notified when a matching offer appears in your zone while the app is open, with a catch-up scan on start. Adds a save affordance in the search bar, a saved-searches list (apply/delete) with a per-search new-match badge, an AppBar entry badged with the unseen total, and notification-tap routing to the list. Alerts evaluate against the user's current area, dedup via seen keys, and skip own/blocked/hidden/non-active offers. en+es strings.
This commit is contained in:
parent
c0cd299408
commit
93028c4933
9 changed files with 549 additions and 4 deletions
|
|
@ -267,6 +267,16 @@ class OffersCubit extends Cubit<OffersState> {
|
|||
void setHiddenOffers(Set<String> offerKeys) =>
|
||||
emit(state.copyWith(hiddenOfferKeys: offerKeys));
|
||||
|
||||
/// Applies a saved search's query and facets to the current discoveries.
|
||||
/// Purely local (does not re-hit the transport) — the area is unchanged, so
|
||||
/// the same discovered offers are simply re-narrowed by the saved filters.
|
||||
void applySavedSearch(SavedSearch search) => emit(state.copyWith(
|
||||
query: search.query,
|
||||
typeFilter: search.types,
|
||||
categoryFilter: search.categories,
|
||||
organicOnly: search.organicOnly,
|
||||
));
|
||||
|
||||
/// Clears every chip filter (leaves the text search untouched).
|
||||
void clearFilters() => emit(state.copyWith(
|
||||
typeFilter: const {},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue