From 529bb0dca0d5e81c45eb67d7d5b134dad1a0cfb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=E2=80=99Aquino?= Date: Fri, 14 Nov 2025 17:24:38 -0800 Subject: [PATCH] Add more toggles in Labs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No changelog is needed because we already have changelog messages for the features added. Changelog-None Signed-off-by: Daniel D’Aquino --- .../Labs/Views/DamusLabsExperiments.swift | 17 +++++++++++++---- .../Settings/Models/UserSettingsStore.swift | 7 +++---- 2 files changed, 16 insertions(+), 8 deletions(-) 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