platos: paywall inmediato al llegar al limite y orden alfabetico
- attemptAddDish/attemptCreateDish: el limite gratuito se comprueba en el tap de anadir plato (DishListView y los 3 puntos de Home) y muestra el DishLimitModal -> paywall directamente; antes solo se comprobaba al guardar el formulario y el usuario podia rellenarlo entero para nada - DishLimitModal compartido (era private de DishFormView) y PaywallPresentation promovido a PremiumView.swift; DishListView usa sheet(item:) tambien para el banner (source dish_counter vs dish_limit) - Boton en la toolbar de Mis Platos que alterna orden alfabetico (persistido en dish_list_alphabetical_sort); borrado por swipe corregido para usar la lista mostrada Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
import SwiftUI
|
||||
import StoreKit
|
||||
|
||||
/// Wrapper for presenting the paywall via `sheet(item:)` so the attribution
|
||||
/// source travels with the presentation (two separate @State vars sometimes
|
||||
/// rendered the sheet before the source was set — GA4 logged "unknown").
|
||||
struct PaywallPresentation: Identifiable {
|
||||
let id = UUID()
|
||||
let source: String
|
||||
}
|
||||
|
||||
struct PremiumView: View {
|
||||
@Environment(\.modelContext) private var context
|
||||
@StateObject private var storeManager = StoreManager()
|
||||
|
||||
Reference in New Issue
Block a user