diff --git a/damus/Features/Labs/Views/DamusLabsExperiments.swift b/damus/Features/Labs/Views/DamusLabsExperiments.swift index e6439a80..a4b733cc 100644 --- a/damus/Features/Labs/Views/DamusLabsExperiments.swift +++ b/damus/Features/Labs/Views/DamusLabsExperiments.swift @@ -12,6 +12,10 @@ struct DamusLabsExperiments: View { let damus_state: DamusState @ObservedObject var settings: UserSettingsStore @State var show_live_explainer: Bool = false + @State var show_favorites_explainer: Bool = false + + let live_label = NSLocalizedString("Live", comment: "Label for a toggle that enables an experimental feature") + let favorites_label = NSLocalizedString("Favorites", comment: "Label for a toggle that enables an experimental feature") var body: some View { ScrollView { @@ -38,8 +42,8 @@ struct DamusLabsExperiments: View { .cornerRadius(15) .padding(.top, 10) - LabsToggleView(toggleName: "Live", systemImage: "record.circle", isOn: $settings.live, showInfo: $show_live_explainer) - + LabsToggleView(toggleName: live_label, systemImage: "record.circle", isOn: $settings.live, showInfo: $show_live_explainer) + LabsToggleView(toggleName: favorites_label, systemImage: "heart.fill", isOn: $settings.enable_favourites_feature, showInfo: $show_favorites_explainer) } .padding([.trailing, .leading], 20) .padding(.bottom, 50) @@ -52,11 +56,16 @@ struct DamusLabsExperiments: View { .ignoresSafeArea(edges: .bottom) .sheet(isPresented: $show_live_explainer) { LabsExplainerView( - labName: "Live", + labName: live_label, systemImage: "record.circle", labDescription: "This will allow you to see all the real-time live streams happening on Nostr! As well as let you view and interact in the Live Chat. Please keep in mind this is still a work in progress and issues are expected. When enabled you will see the Live option in your side menu.") } - + .sheet(isPresented: $show_favorites_explainer) { + LabsExplainerView( + labName: favorites_label, + systemImage: "heart.fill", + labDescription: "This will allow you to pick users to be part of your favorites list. You can also switch your profile timeline to only see posts from your favorite contacts.") + } } } diff --git a/damus/Features/Settings/Models/UserSettingsStore.swift b/damus/Features/Settings/Models/UserSettingsStore.swift index 6f598aa8..9c1785da 100644 --- a/damus/Features/Settings/Models/UserSettingsStore.swift +++ b/damus/Features/Settings/Models/UserSettingsStore.swift @@ -249,10 +249,6 @@ class UserSettingsStore: ObservableObject { @Setting(key: "enable_experimental_load_new_content_button", default_value: false) var enable_experimental_load_new_content_button: Bool - /// Whether the app should show the Favourites feature (Damus Labs) - @Setting(key: "enable_favourites_feature", default_value: false) - var enable_favourites_feature: Bool - @StringSetting(key: "purple_environment", default_value: .production) var purple_enviroment: DamusPurpleEnvironment @@ -365,6 +361,9 @@ class UserSettingsStore: ObservableObject { @Setting(key: "live", default_value: false) var live: Bool + /// Whether the app should show the Favourites feature (Damus Labs) + @Setting(key: "labs_experiment_favorites", default_value: false) + var enable_favourites_feature: Bool // MARK: Internal, hidden settings