Skip to content

Commit

Permalink
Fix QA issues in theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesmchen-signal committed Aug 15, 2018
1 parent 22dda47 commit a76d488
Show file tree
Hide file tree
Showing 29 changed files with 270 additions and 52 deletions.
24 changes: 24 additions & 0 deletions Signal.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
3421981C21061D2E00C57195 /* ByteParserTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3421981B21061D2E00C57195 /* ByteParserTest.swift */; };
34277A5E20751BDC006049F2 /* OWSQuotedMessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34277A5C20751BDC006049F2 /* OWSQuotedMessageView.m */; };
3427C64320F500E000EEC730 /* OWSMessageTimerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3427C64220F500DF00EEC730 /* OWSMessageTimerView.m */; };
342950822124C9750000B063 /* OWSTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 3429507E2124C9740000B063 /* OWSTextField.m */; };
342950832124C9750000B063 /* OWSTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3429507F2124C9740000B063 /* OWSTextView.m */; };
342950842124C9750000B063 /* OWSTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 342950802124C9740000B063 /* OWSTextView.h */; settings = {ATTRIBUTES = (Public, ); }; };
342950852124C9750000B063 /* OWSTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 342950812124C9750000B063 /* OWSTextField.h */; settings = {ATTRIBUTES = (Public, ); }; };
342950882124CB0A0000B063 /* OWSSearchBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 342950862124CB0A0000B063 /* OWSSearchBar.m */; };
342950892124CB0A0000B063 /* OWSSearchBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 342950872124CB0A0000B063 /* OWSSearchBar.h */; settings = {ATTRIBUTES = (Public, ); }; };
3430FE181F7751D4000EC51B /* GiphyAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3430FE171F7751D4000EC51B /* GiphyAPI.swift */; };
34330A5A1E7875FB00DF2FB9 /* fontawesome-webfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 34330A591E7875FB00DF2FB9 /* fontawesome-webfont.ttf */; };
34330A5C1E787A9800DF2FB9 /* dripicons-v2.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 34330A5B1E787A9800DF2FB9 /* dripicons-v2.ttf */; };
Expand Down Expand Up @@ -670,6 +676,12 @@
34277A5D20751BDC006049F2 /* OWSQuotedMessageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSQuotedMessageView.h; sourceTree = "<group>"; };
3427C64120F500DE00EEC730 /* OWSMessageTimerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSMessageTimerView.h; sourceTree = "<group>"; };
3427C64220F500DF00EEC730 /* OWSMessageTimerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSMessageTimerView.m; sourceTree = "<group>"; };
3429507E2124C9740000B063 /* OWSTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSTextField.m; sourceTree = "<group>"; };
3429507F2124C9740000B063 /* OWSTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSTextView.m; sourceTree = "<group>"; };
342950802124C9740000B063 /* OWSTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSTextView.h; sourceTree = "<group>"; };
342950812124C9750000B063 /* OWSTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSTextField.h; sourceTree = "<group>"; };
342950862124CB0A0000B063 /* OWSSearchBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSSearchBar.m; sourceTree = "<group>"; };
342950872124CB0A0000B063 /* OWSSearchBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSSearchBar.h; sourceTree = "<group>"; };
3430FE171F7751D4000EC51B /* GiphyAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GiphyAPI.swift; sourceTree = "<group>"; };
34330A591E7875FB00DF2FB9 /* fontawesome-webfont.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "fontawesome-webfont.ttf"; sourceTree = "<group>"; };
34330A5B1E787A9800DF2FB9 /* dripicons-v2.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "dripicons-v2.ttf"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1698,6 +1710,12 @@
34AC0A09211B39E900997B47 /* OWSFlatButton.swift */,
34AC09FE211B39E700997B47 /* OWSLayerView.swift */,
34AC0A03211B39E800997B47 /* OWSNavigationBar.swift */,
342950872124CB0A0000B063 /* OWSSearchBar.h */,
342950862124CB0A0000B063 /* OWSSearchBar.m */,
342950812124C9750000B063 /* OWSTextField.h */,
3429507E2124C9740000B063 /* OWSTextField.m */,
342950802124C9740000B063 /* OWSTextView.h */,
3429507F2124C9740000B063 /* OWSTextView.m */,
34AC0A05211B39E900997B47 /* TappableStackView.swift */,
34AC09FD211B39E700997B47 /* TappableView.swift */,
34AC0A0D211B39EA00997B47 /* ThreadViewHelper.h */,
Expand Down Expand Up @@ -2520,6 +2538,7 @@
34AC09F1211B39B100997B47 /* LockInteractionController.h in Headers */,
346129B41FD1F7E800532771 /* OWSProfileManager.h in Headers */,
3421981521061A0700C57195 /* UIColor+JSQMessages.h in Headers */,
342950892124CB0A0000B063 /* OWSSearchBar.h in Headers */,
346129FA1FD5F31400532771 /* OWS100RemoveTSRecipientsMigration.h in Headers */,
346129E21FD5C0BE00532771 /* VersionMigrations.h in Headers */,
34AC09E8211B39B100997B47 /* NewNonContactConversationViewController.h in Headers */,
Expand All @@ -2542,12 +2561,14 @@
451F8A4A1FD715D9005CB9DA /* OWSContactAvatarBuilder.h in Headers */,
34480B5B1FD0A7E300BC14EF /* SignalMessaging-Prefix.pch in Headers */,
45194F921FD7215600333B2C /* OWSContactOffersInteraction.h in Headers */,
342950842124C9750000B063 /* OWSTextView.h in Headers */,
3478506A1FD9B78A007B8332 /* AppSetup.h in Headers */,
346129A51FD1F09100532771 /* OWSContactsManager.h in Headers */,
34480B681FD0AA9400BC14EF /* UIFont+OWS.h in Headers */,
45194F941FD7216000333B2C /* TSUnreadIndicatorInteraction.h in Headers */,
34AC09F5211B39B100997B47 /* SharingThreadPickerViewController.h in Headers */,
34AC09E0211B39B100997B47 /* SelectRecipientViewController.h in Headers */,
342950852124C9750000B063 /* OWSTextField.h in Headers */,
45194F901FD7200000333B2C /* ThreadUtil.h in Headers */,
346129CC1FD2072E00532771 /* NSAttributedString+OWS.h in Headers */,
346129FD1FD5F31400532771 /* OWS102MoveLoggingPreferenceToUserDefaults.h in Headers */,
Expand Down Expand Up @@ -3159,8 +3180,11 @@
34074F61203D0CBE004596AE /* OWSSounds.m in Sources */,
346129B51FD1F7E800532771 /* OWSProfileManager.m in Sources */,
346129701FD1D74C00532771 /* Release.m in Sources */,
342950832124C9750000B063 /* OWSTextView.m in Sources */,
3421981321061A0700C57195 /* JSQMessagesAvatarImageFactory.m in Sources */,
452EC6E1205FF5DC000E787C /* Bench.swift in Sources */,
342950882124CB0A0000B063 /* OWSSearchBar.m in Sources */,
342950822124C9750000B063 /* OWSTextField.m in Sources */,
34AC0A13211B39EA00997B47 /* DisappearingTimerConfigurationView.swift in Sources */,
3478506C1FD9B78A007B8332 /* NoopNotificationsManager.swift in Sources */,
34480B621FD0A98800BC14EF /* UIColor+OWS.m in Sources */,
Expand Down
7 changes: 1 addition & 6 deletions Signal/src/ViewControllers/ContactsPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ public class ContactsPicker: OWSViewController, UITableViewDelegate, UITableView
tableView.delegate = self
tableView.dataSource = self

let searchBar = UISearchBar()
let searchBar = OWSSearchBar()
self.searchBar = searchBar
searchBar.searchBarStyle = .minimal
searchBar.delegate = self
searchBar.sizeToFit()

Expand All @@ -117,10 +116,6 @@ public class ContactsPicker: OWSViewController, UITableViewDelegate, UITableView
self.view.backgroundColor = Theme.backgroundColor
self.tableView.backgroundColor = Theme.backgroundColor

self.searchBar.backgroundColor = Theme.searchBarBackgroundColor
self.searchBar.barStyle = Theme.barStyle
self.searchBar.searchBarStyle = Theme.searchBarStyle
self.searchBar.barTintColor = Theme.backgroundColor
searchBar.placeholder = NSLocalizedString("INVITE_FRIENDS_PICKER_SEARCHBAR_PLACEHOLDER", comment: "Search")

// Auto size cells for dynamic type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//

#import <SignalMessaging/OWSTextView.h>

NS_ASSUME_NONNULL_BEGIN

@interface OWSMessageTextView : UITextView
@interface OWSMessageTextView : OWSTextView

@property (nonatomic) BOOL shouldIgnoreEvents;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//

#import <SignalMessaging/OWSTextView.h>

NS_ASSUME_NONNULL_BEGIN

@class SignalAttachment;
Expand All @@ -24,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN

#pragma mark -

@interface ConversationInputTextView : UITextView
@interface ConversationInputTextView : OWSTextView

@property (weak, nonatomic) id<ConversationInputTextViewDelegate> inputTextViewDelegate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
self.thread = thread
self.messageSender = messageSender

self.searchBar = UISearchBar()
self.searchBar = OWSSearchBar()
self.layout = GifPickerLayout()
self.collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: self.layout)

Expand Down Expand Up @@ -157,14 +157,9 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
self.automaticallyAdjustsScrollViewInsets = false

// Search
searchBar.searchBarStyle = .minimal
searchBar.delegate = self
searchBar.placeholder = NSLocalizedString("GIF_VIEW_SEARCH_PLACEHOLDER_TEXT",
comment: "Placeholder text for the search field in GIF view")
searchBar.backgroundColor = Theme.searchBarBackgroundColor
searchBar.barStyle = Theme.barStyle
searchBar.searchBarStyle = Theme.searchBarStyle
searchBar.barTintColor = Theme.backgroundColor

self.view.addSubview(searchBar)
searchBar.autoPinWidthToSuperview()
Expand Down
6 changes: 1 addition & 5 deletions Signal/src/ViewControllers/HomeView/HomeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,6 @@ - (void)applyTheme

self.view.backgroundColor = Theme.backgroundColor;
self.tableView.backgroundColor = Theme.backgroundColor;
self.searchBar.backgroundColor = Theme.searchBarBackgroundColor;
self.searchBar.barTintColor = Theme.backgroundColor;
self.searchBar.barStyle = Theme.barStyle;
self.searchBar.searchBarStyle = Theme.searchBarStyle;
}

#pragma mark - View Life Cycle
Expand Down Expand Up @@ -401,7 +397,7 @@ - (void)viewDidLoad

// Search

UISearchBar *searchBar = [UISearchBar new];
UISearchBar *searchBar = [OWSSearchBar new];
_searchBar = searchBar;
searchBar.placeholder = NSLocalizedString(@"HOME_VIEW_CONVERSATION_SEARCHBAR_PLACEHOLDER",
@"Placeholder text for search bar which filters conversations.");
Expand Down
2 changes: 1 addition & 1 deletion Signal/src/ViewControllers/LongTextViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class LongTextViewController: OWSViewController {
private func createViews() {
view.backgroundColor = Theme.backgroundColor

let messageTextView = UITextView()
let messageTextView = OWSTextView()
self.messageTextView = messageTextView
messageTextView.font = UIFont.ows_dynamicTypeBody
messageTextView.backgroundColor = Theme.backgroundColor
Expand Down
7 changes: 1 addition & 6 deletions Signal/src/ViewControllers/NewContactThreadViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,10 @@ - (void)loadView
self.navigationItem.rightBarButtonItem = newGroupButton;

// Search
UISearchBar *searchBar = [UISearchBar new];
UISearchBar *searchBar = [OWSSearchBar new];
_searchBar = searchBar;
searchBar.searchBarStyle = UISearchBarStyleMinimal;
searchBar.delegate = self;
searchBar.placeholder = NSLocalizedString(@"SEARCH_BYNAMEORNUMBER_PLACEHOLDER_TEXT", @"");
searchBar.backgroundColor = Theme.searchBarBackgroundColor;
searchBar.barStyle = Theme.barStyle;
searchBar.searchBarStyle = Theme.searchBarStyle;
searchBar.barTintColor = Theme.backgroundColor;
[searchBar sizeToFit];

_tableViewController = [OWSTableViewController new];
Expand Down
2 changes: 1 addition & 1 deletion Signal/src/ViewControllers/NewGroupViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ - (UIView *)firstSectionHeader
[avatarView autoSetDimension:ALDimensionHeight toSize:kNewGroupViewControllerAvatarWidth];
[self updateAvatarView];

UITextField *groupNameTextField = [UITextField new];
UITextField *groupNameTextField = [OWSTextField new];
_groupNameTextField = groupNameTextField;
groupNameTextField.textColor = Theme.primaryColor;
groupNameTextField.font = [UIFont ows_dynamicTypeTitle2Font];
Expand Down
2 changes: 1 addition & 1 deletion Signal/src/ViewControllers/OWS2FASettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ - (UILabel *)createLabelWithText:(NSString *)text

- (void)createPinTextfield
{
self.pinTextfield = [UITextField new];
self.pinTextfield = [OWSTextField new];
self.pinTextfield.textColor = [Theme primaryColor];
self.pinTextfield.font = [UIFont ows_mediumFontWithSize:ScaleFromIPhone5To7Plus(30.f, 36.f)];
self.pinTextfield.textAlignment = NSTextAlignmentCenter;
Expand Down
2 changes: 1 addition & 1 deletion Signal/src/ViewControllers/ProfileViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ - (void)createViews
if (UIDevice.currentDevice.isShorterThanIPhone5) {
nameTextField = [DismissableTextField new];
} else {
nameTextField = [UITextField new];
nameTextField = [OWSTextField new];
}
_nameTextField = nameTextField;
nameTextField.font = [UIFont ows_mediumFontWithSize:18.f];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ - (void)createViews
if (UIDevice.currentDevice.isShorterThanIPhone5) {
_challengeTextField = [DismissableTextField new];
} else {
_challengeTextField = [UITextField new];
_challengeTextField = [OWSTextField new];
}

_challengeTextField.textColor = [UIColor blackColor];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ - (void)createViews
if (UIDevice.currentDevice.isShorterThanIPhone5) {
phoneNumberTextField = [DismissableTextField new];
} else {
phoneNumberTextField = [UITextField new];
phoneNumberTextField = [OWSTextField new];
}

phoneNumberTextField.textAlignment = NSTextAlignmentRight;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ - (UIView *)firstSectionHeader
_groupAvatar = self.thread.groupModel.groupImage;
[self updateAvatarView];

UITextField *groupNameTextField = [UITextField new];
UITextField *groupNameTextField = [OWSTextField new];
_groupNameTextField = groupNameTextField;
self.groupNameTextField.text = [self.thread.groupModel.groupName ows_stripped];
groupNameTextField.textColor = [Theme primaryColor];
Expand Down
2 changes: 1 addition & 1 deletion Signal/src/views/PinEntryView.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ - (void)createPinTextfield
if (UIDevice.currentDevice.isShorterThanIPhone5) {
self.pinTextfield = [DismissableTextField new];
} else {
self.pinTextfield = [UITextField new];
self.pinTextfield = [OWSTextField new];
}

self.pinTextfield.textColor = [Theme primaryColor];
Expand Down
13 changes: 8 additions & 5 deletions SignalMessaging/SignalMessaging.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ FOUNDATION_EXPORT const unsigned char SignalMessagingVersionString[];
#import <SignalMessaging/AppSetup.h>
#import <SignalMessaging/AttachmentSharing.h>
#import <SignalMessaging/BlockListUIUtils.h>
#import <SignalMessaging/ContactCellView.h>
#import <SignalMessaging/ContactTableViewCell.h>
#import <SignalMessaging/ContactsViewHelper.h>
#import <SignalMessaging/CountryCodeViewController.h>
#import <SignalMessaging/DebugLogger.h>
#import <SignalMessaging/Environment.h>
#import <SignalMessaging/LockInteractionController.h>
#import <SignalMessaging/NSAttributedString+OWS.h>
#import <SignalMessaging/NSString+OWS.h>
#import <SignalMessaging/NewNonContactConversationViewController.h>
#import <SignalMessaging/OWSAudioPlayer.h>
#import <SignalMessaging/OWSContactAvatarBuilder.h>
#import <SignalMessaging/OWSContactOffersInteraction.h>
Expand All @@ -32,13 +36,17 @@ FOUNDATION_EXPORT const unsigned char SignalMessagingVersionString[];
#import <SignalMessaging/OWSNavigationController.h>
#import <SignalMessaging/OWSProfileManager.h>
#import <SignalMessaging/OWSQuotedReplyModel.h>
#import <SignalMessaging/OWSSearchBar.h>
#import <SignalMessaging/OWSSounds.h>
#import <SignalMessaging/OWSTableViewController.h>
#import <SignalMessaging/OWSTextField.h>
#import <SignalMessaging/OWSTextView.h>
#import <SignalMessaging/OWSUnreadIndicator.h>
#import <SignalMessaging/OWSUserProfile.h>
#import <SignalMessaging/OWSWindowManager.h>
#import <SignalMessaging/Release.h>
#import <SignalMessaging/ScreenLockViewController.h>
#import <SignalMessaging/SelectRecipientViewController.h>
#import <SignalMessaging/SharingThreadPickerViewController.h>
#import <SignalMessaging/SignalKeyingStorage.h>
#import <SignalMessaging/TSUnreadIndicatorInteraction.h>
Expand All @@ -50,11 +58,6 @@ FOUNDATION_EXPORT const unsigned char SignalMessagingVersionString[];
#import <SignalMessaging/UIUtil.h>
#import <SignalMessaging/UIView+OWS.h>
#import <SignalMessaging/UIViewController+OWS.h>
#import <SignalMessaging/ContactCellView.h>
#import <SignalMessaging/CountryCodeViewController.h>
#import <SignalMessaging/LockInteractionController.h>
#import <SignalMessaging/SelectRecipientViewController.h>
#import <SignalMessaging/NewNonContactConversationViewController.h>
#import <SignalMessaging/VersionMigrations.h>
#import <SignalMessaging/ViewControllerUtils.h>
#import <SignalServiceKit/UIImage+OWS.h>
8 changes: 2 additions & 6 deletions SignalMessaging/ViewControllers/CountryCodeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

#import "CountryCodeViewController.h"
#import "OWSSearchBar.h"
#import "PhoneNumberUtil.h"
#import "UIColor+OWS.h"
#import "UIFont+OWS.h"
Expand Down Expand Up @@ -45,15 +46,10 @@ - (void)loadView
- (void)createViews
{
// Search
UISearchBar *searchBar = [UISearchBar new];
UISearchBar *searchBar = [OWSSearchBar new];
_searchBar = searchBar;
searchBar.searchBarStyle = UISearchBarStyleMinimal;
searchBar.delegate = self;
searchBar.placeholder = NSLocalizedString(@"SEARCH_BYNAMEORNUMBER_PLACEHOLDER_TEXT", @"");
searchBar.backgroundColor = Theme.searchBarBackgroundColor;
searchBar.barStyle = Theme.barStyle;
searchBar.searchBarStyle = Theme.searchBarStyle;
searchBar.barTintColor = Theme.backgroundColor;
[searchBar sizeToFit];

self.tableView.tableHeaderView = searchBar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
recipientRow.autoPin(toTopLayoutGuideOf: self, withInset: 0)

// Text View
textView = UITextView()
textView = OWSTextView()
textView.delegate = self
textView.backgroundColor = Theme.backgroundColor
textView.textColor = Theme.primaryColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ - (UILabel *)examplePhoneNumberLabel
- (UITextField *)phoneNumberTextField
{
if (!_phoneNumberTextField) {
_phoneNumberTextField = [UITextField new];
_phoneNumberTextField = [OWSTextField new];
_phoneNumberTextField.font = [UIFont ows_mediumFontWithSize:18.f];
_phoneNumberTextField.textAlignment = _phoneNumberTextField.textAlignmentUnnatural;
_phoneNumberTextField.textColor = [UIColor ows_materialBlueColor];
Expand Down
8 changes: 2 additions & 6 deletions SignalMessaging/ViewControllers/SelectThreadViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import "NSString+OWS.h"
#import "NewNonContactConversationViewController.h"
#import "OWSContactsManager.h"
#import "OWSSearchBar.h"
#import "OWSTableViewController.h"
#import "ThreadViewHelper.h"
#import "UIColor+OWS.h"
Expand Down Expand Up @@ -86,15 +87,10 @@ - (void)createViews
OWSAssert(self.selectThreadViewDelegate);

// Search
UISearchBar *searchBar = [UISearchBar new];
UISearchBar *searchBar = [OWSSearchBar new];
_searchBar = searchBar;
searchBar.searchBarStyle = UISearchBarStyleMinimal;
searchBar.delegate = self;
searchBar.placeholder = NSLocalizedString(@"SEARCH_BYNAMEORNUMBER_PLACEHOLDER_TEXT", @"");
searchBar.backgroundColor = Theme.searchBarBackgroundColor;
searchBar.barStyle = Theme.barStyle;
searchBar.searchBarStyle = Theme.searchBarStyle;
searchBar.barTintColor = Theme.backgroundColor;
[searchBar sizeToFit];

UIView *header = [self.selectThreadViewDelegate createHeaderWithSearchBar:searchBar];
Expand Down
11 changes: 11 additions & 0 deletions SignalMessaging/Views/OWSSearchBar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//

NS_ASSUME_NONNULL_BEGIN

@interface OWSSearchBar : UISearchBar

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit a76d488

Please sign in to comment.