From 2068623165c50cbc164f3dd7d9c232ff481391a3 Mon Sep 17 00:00:00 2001 From: Damon Bayer Date: Thu, 26 Nov 2026 11:22:16 -0600 Subject: [PATCH 1/2] Use support plugins for Therapy Settings help --- Loop/Views/SettingsView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Loop/Views/SettingsView.swift b/Loop/Views/SettingsView.swift index 0d0e1ac800..aaf26e172f 100644 --- a/Loop/Views/SettingsView.swift +++ b/Loop/Views/SettingsView.swift @@ -442,7 +442,8 @@ extension SettingsView { viewModel: TherapySettingsViewModel( therapySettings: viewModel.therapySettings(), delegate: viewModel.therapySettingsViewModelDelegate - ) + ), + helpView: viewModel.availableSupports.lazy.compactMap { $0.therapySettingsHelpView() }.first ) .environmentObject(displayGlucosePreference) .environment(\.dismissAction, self.dismiss) From ba866aa8448a824992794a50983d45d607d1ad81 Mon Sep 17 00:00:00 2001 From: Damon Bayer Date: Thu, 26 Nov 2026 23:29:29 -0600 Subject: [PATCH 2/2] Display all Therapy Settings support menu items --- Loop/Views/SettingsView.swift | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Loop/Views/SettingsView.swift b/Loop/Views/SettingsView.swift index aaf26e172f..7a8371419a 100644 --- a/Loop/Views/SettingsView.swift +++ b/Loop/Views/SettingsView.swift @@ -103,11 +103,12 @@ struct SettingsView: View { servicesSection } - // Catch-all for menu items without a dedicated section (e.g. .custom). - // .configuration items render in the configuration section and - // .support items in the Support section, so exclude both to avoid - // showing them twice. - ForEach(pluginMenuItems.filter({ $0.section != .support && $0.section != .configuration })) { item in + // Render custom menu items here. Built-in sections render at their destinations. + ForEach(pluginMenuItems.filter { + $0.section != .support && + $0.section != .configuration && + $0.section != .therapySettingsSupport + }) { item in item.view } @@ -443,7 +444,7 @@ extension SettingsView { therapySettings: viewModel.therapySettings(), delegate: viewModel.therapySettingsViewModelDelegate ), - helpView: viewModel.availableSupports.lazy.compactMap { $0.therapySettingsHelpView() }.first + supportMenuItems: pluginMenuItems.filter { $0.section == .therapySettingsSupport }.map(\.view) ) .environmentObject(displayGlucosePreference) .environment(\.dismissAction, self.dismiss) @@ -488,7 +489,7 @@ extension SettingsView { } } - private var pluginMenuItems: [PluginMenuItem] { + private var pluginMenuItems: [PluginMenuItem] { self.viewModel.availableSupports.flatMap { plugin in plugin.configurationMenuItems().enumerated().map { index, item in PluginMenuItem(section: item.section, view: item.view, pluginIdentifier: plugin.pluginIdentifier, offset: index)