payment and list

This commit is contained in:
Daniel Arantes Loverde
2026-02-24 10:19:47 -03:00
parent 3a3dc7217b
commit ca83a275ac
51 changed files with 1645 additions and 256 deletions

View File

@@ -83,10 +83,6 @@ struct HomeView: View {
.onChange(of: addressCacheScope) { _, _ in
guard hasRequestedLocation else { return }
Task {
AppContentCache.shared.invalidate(prefix: "stores:")
AppContentCache.shared.invalidate(prefix: "store-info:")
AppContentCache.shared.invalidate(prefix: "store-catalog:")
AppImageCache.shared.invalidateAll()
await bootstrapStoresFlow(
forceLocationRefresh: true,
category: selectedCategory == "all" ? nil : selectedCategory,
@@ -435,7 +431,7 @@ struct HomeView: View {
isLoadingStores = false
stores = cachedStores
if refreshCategories || (category == nil && categories.count <= 1) {
await loadHomeCategories(withFallbackStores: cachedStores)
await loadHomeCategories(withFallbackStores: cachedStores, forceRefresh: forceLocationRefresh)
if categories.contains(where: { $0.id == selectedCategory }) == false {
selectedCategory = "all"
}
@@ -457,9 +453,9 @@ struct HomeView: View {
}
let results = response.result ?? []
stores = results
AppContentCache.shared.set(results, for: storesCacheKey, ttl: 180)
AppContentCache.shared.set(results, for: storesCacheKey, ttl: AppCacheTTL.homeStores)
if refreshCategories || (category == nil && categories.count <= 1) {
await loadHomeCategories(withFallbackStores: results)
await loadHomeCategories(withFallbackStores: results, forceRefresh: forceLocationRefresh)
if categories.contains(where: { $0.id == selectedCategory }) == false {
selectedCategory = "all"
}