CR: remove unnecessary param, clearer code, comment typo
This commit is contained in:
parent
6e50a5353b
commit
0c1b2e9f48
|
@ -341,8 +341,7 @@
|
|||
|
||||
- (void)showInviteFlow
|
||||
{
|
||||
OWSInviteFlow *inviteFlow =
|
||||
[[OWSInviteFlow alloc] initWithPresentingViewController:self contactsManager:self.contactsManager];
|
||||
OWSInviteFlow *inviteFlow = [[OWSInviteFlow alloc] initWithPresentingViewController:self];
|
||||
[self presentViewController:inviteFlow.actionSheetController animated:YES completion:nil];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
@ -86,8 +86,7 @@ public class ContactShareViewHelper: NSObject, CNContactViewControllerDelegate {
|
|||
return
|
||||
}
|
||||
|
||||
let inviteFlow =
|
||||
InviteFlow(presentingViewController: fromViewController, contactsManager: contactsManager)
|
||||
let inviteFlow = InviteFlow(presentingViewController: fromViewController)
|
||||
inviteFlow.sendSMSTo(phoneNumbers: phoneNumbers)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
@ -19,16 +19,15 @@ class InviteFlow: NSObject, MFMessageComposeViewControllerDelegate, MFMailCompos
|
|||
|
||||
@objc
|
||||
let actionSheetController: UIAlertController
|
||||
|
||||
@objc
|
||||
let presentingViewController: UIViewController
|
||||
let contactsManager: OWSContactsManager
|
||||
|
||||
var channel: Channel?
|
||||
|
||||
@objc
|
||||
required init(presentingViewController: UIViewController, contactsManager: OWSContactsManager) {
|
||||
required init(presentingViewController: UIViewController) {
|
||||
self.presentingViewController = presentingViewController
|
||||
self.contactsManager = contactsManager
|
||||
actionSheetController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
|
||||
|
||||
super.init()
|
||||
|
|
|
@ -689,8 +689,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (void)presentInviteFlow
|
||||
{
|
||||
OWSInviteFlow *inviteFlow =
|
||||
[[OWSInviteFlow alloc] initWithPresentingViewController:self contactsManager:self.contactsManager];
|
||||
OWSInviteFlow *inviteFlow = [[OWSInviteFlow alloc] initWithPresentingViewController:self];
|
||||
[self presentViewController:inviteFlow.actionSheetController animated:YES completion:nil];
|
||||
}
|
||||
|
||||
|
@ -738,8 +737,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
- (void)sendTextToPhoneNumber:(NSString *)phoneNumber
|
||||
{
|
||||
|
||||
OWSInviteFlow *inviteFlow =
|
||||
[[OWSInviteFlow alloc] initWithPresentingViewController:self contactsManager:self.contactsManager];
|
||||
OWSInviteFlow *inviteFlow = [[OWSInviteFlow alloc] initWithPresentingViewController:self];
|
||||
|
||||
OWSAssertDebug([phoneNumber length] > 0);
|
||||
NSString *confirmMessage = NSLocalizedString(@"SEND_SMS_CONFIRM_TITLE", @"");
|
||||
|
@ -956,12 +954,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
- (NSString *)searchText
|
||||
{
|
||||
NSString *rawText = self.searchBar.text;
|
||||
NSString *stripped = rawText.ows_stripped;
|
||||
if (stripped.length == 0) {
|
||||
return @"";
|
||||
} else {
|
||||
return stripped;
|
||||
}
|
||||
return rawText.ows_stripped ?: @"";
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)parsePossibleSearchPhoneNumbers
|
||||
|
|
|
@ -212,7 +212,7 @@ public class ConversationSearcher: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
// Order "contact results by display name.
|
||||
// Order contact results by display name.
|
||||
signalContacts.sort()
|
||||
|
||||
// Order the conversation and message results in reverse chronological order.
|
||||
|
|
Loading…
Reference in New Issue