From e69494450b0ce05c63bd16f90b6830b5ed5a7627 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 1 Apr 2019 13:56:20 -0600 Subject: [PATCH] put conversation search behind feature flag --- .../OWSConversationSettingsViewController.m | 31 ++++++++++--------- SignalServiceKit/src/Util/FeatureFlags.swift | 5 +++ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m index 1cc654e74..d18d868b3 100644 --- a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m +++ b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m @@ -371,21 +371,22 @@ const CGFloat kIconViewLength = 24; [weakSelf showMediaGallery]; }]]; - // TODO icon - [mainSection addItem:[OWSTableItem - itemWithCustomCellBlock:^{ - NSString *title = NSLocalizedString(@"CONVERSATION_SETTINGS_SEARCH", - @"Table cell label in conversation settings which returns the user to the " - @"conversation with 'search mode' activated"); - return [weakSelf - disclosureCellWithName:title - iconName:@"conversation_settings_search" - accessibilityIdentifier:ACCESSIBILITY_IDENTIFIER_WITH_NAME( - OWSConversationSettingsViewController, @"search")]; - } - actionBlock:^{ - [weakSelf tappedConversationSearch]; - }]]; + if (SSKFeatureFlags.conversationSearch) { + [mainSection addItem:[OWSTableItem + itemWithCustomCellBlock:^{ + NSString *title = NSLocalizedString(@"CONVERSATION_SETTINGS_SEARCH", + @"Table cell label in conversation settings which returns the user to the " + @"conversation with 'search mode' activated"); + return [weakSelf + disclosureCellWithName:title + iconName:@"conversation_settings_search" + accessibilityIdentifier:ACCESSIBILITY_IDENTIFIER_WITH_NAME( + OWSConversationSettingsViewController, @"search")]; + } + actionBlock:^{ + [weakSelf tappedConversationSearch]; + }]]; + } if (!isNoteToSelf && !self.isGroupThread && self.thread.hasSafetyNumbers) { [mainSection diff --git a/SignalServiceKit/src/Util/FeatureFlags.swift b/SignalServiceKit/src/Util/FeatureFlags.swift index 4d58938c0..d8cbac11b 100644 --- a/SignalServiceKit/src/Util/FeatureFlags.swift +++ b/SignalServiceKit/src/Util/FeatureFlags.swift @@ -9,6 +9,11 @@ import Foundation @objc(SSKFeatureFlags) public class FeatureFlags: NSObject { + @objc + public static var conversationSearch: Bool { + return false + } + /// iOS has long supported sending oversized text as a sidecar attachment. The other clients /// simply displayed it as a text attachment. As part of the new cross-client long-text feature, /// we want to be able to display long text with attachments as well. Existing iOS clients