From 33789c1496c7d5605cf83bbdf67d1cc6cd54d138 Mon Sep 17 00:00:00 2001 From: David Langley Date: Wed, 23 Nov 2022 13:08:54 +0000 Subject: [PATCH 1/2] Add build setting to hide feedback --- Riot/Modules/Home/AllChats/AllChatsCoordinator.swift | 9 +++++---- Riot/Modules/SideMenu/SideMenuViewModel.swift | 7 +++++-- changelog.d/7102.change | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 changelog.d/7102.change diff --git a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift index 1070db4e57..56347a0c40 100644 --- a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift +++ b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift @@ -346,10 +346,11 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { self.showInviteFriends(from: self.avatarMenuButton) }) } - - subMenuActions.append(UIAction(title: VectorL10n.sideMenuActionFeedback, image: UIImage(systemName: "questionmark.circle")) { [weak self] action in - self?.showBugReport() - }) + if BuildSettings.sideMenuShowFeedback { + subMenuActions.append(UIAction(title: VectorL10n.sideMenuActionFeedback, image: UIImage(systemName: "questionmark.circle")) { [weak self] action in + self?.showBugReport() + }) + } actions.append(UIMenu(title: "", options: .displayInline, children: subMenuActions)) actions.append(UIMenu(title: "", options: .displayInline, children: [ diff --git a/Riot/Modules/SideMenu/SideMenuViewModel.swift b/Riot/Modules/SideMenu/SideMenuViewModel.swift index 0b0b84862e..a893e5635a 100644 --- a/Riot/Modules/SideMenu/SideMenuViewModel.swift +++ b/Riot/Modules/SideMenu/SideMenuViewModel.swift @@ -106,10 +106,13 @@ final class SideMenuViewModel: SideMenuViewModelType { } sideMenuItems += [ - .settings, - .feedback + .settings ] + if BuildSettings.sideMenuShowFeedback { + sideMenuItems += [.feedback] + } + // Hide app version let appVersion: String? = nil diff --git a/changelog.d/7102.change b/changelog.d/7102.change new file mode 100644 index 0000000000..931562c1cc --- /dev/null +++ b/changelog.d/7102.change @@ -0,0 +1 @@ +Add BuildSetting to hide feedback in the side-menu From 3c901b8ae69822205532abaa3019827dc99e848d Mon Sep 17 00:00:00 2001 From: David Langley Date: Wed, 23 Nov 2022 15:14:34 +0000 Subject: [PATCH 2/2] Use just one BuildSetting for manual feedback and bug reporting --- Riot/Modules/Home/AllChats/AllChatsCoordinator.swift | 2 +- Riot/Modules/Settings/SettingsViewController.m | 2 +- Riot/Modules/SideMenu/SideMenuViewModel.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift index 56347a0c40..001980b5b5 100644 --- a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift +++ b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift @@ -346,7 +346,7 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { self.showInviteFriends(from: self.avatarMenuButton) }) } - if BuildSettings.sideMenuShowFeedback { + if BuildSettings.allowBugReportingAndFeedbackManually { subMenuActions.append(UIAction(title: VectorL10n.sideMenuActionFeedback, image: UIImage(systemName: "questionmark.circle")) { [weak self] action in self?.showBugReport() }) diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 54bb95d34e..88bc85c4e5 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -554,7 +554,7 @@ - (void)updateSections } [sectionAdvanced addRowWithTag:ADVANCED_MARK_ALL_AS_READ_INDEX]; [sectionAdvanced addRowWithTag:ADVANCED_CLEAR_CACHE_INDEX]; - if (BuildSettings.settingsScreenAllowBugReportingManually) + if (BuildSettings.allowBugReportingAndFeedbackManually) { [sectionAdvanced addRowWithTag:ADVANCED_REPORT_BUG_INDEX]; } diff --git a/Riot/Modules/SideMenu/SideMenuViewModel.swift b/Riot/Modules/SideMenu/SideMenuViewModel.swift index a893e5635a..2cf86f47f8 100644 --- a/Riot/Modules/SideMenu/SideMenuViewModel.swift +++ b/Riot/Modules/SideMenu/SideMenuViewModel.swift @@ -109,7 +109,7 @@ final class SideMenuViewModel: SideMenuViewModelType { .settings ] - if BuildSettings.sideMenuShowFeedback { + if BuildSettings.allowBugReportingAndFeedbackManually { sideMenuItems += [.feedback] }