Fix breakage from recents changes in share extension.
This commit is contained in:
parent
f87b715144
commit
21b54bee4f
|
@ -23,13 +23,7 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
|
|||
let contactsManager: OWSContactsManager
|
||||
|
||||
private(set) var textView: UITextView!
|
||||
private var sendButton: UIBarButtonItem = {
|
||||
return UIBarButtonItem(title: NSLocalizedString("SEND_BUTTON_TITLE",
|
||||
comment: "Label for the send button in the conversation view."),
|
||||
style: .plain,
|
||||
target: self,
|
||||
action: #selector(sendPressed))
|
||||
}()
|
||||
private var sendButton: UIBarButtonItem!
|
||||
|
||||
// MARK: Initializers
|
||||
|
||||
|
@ -52,10 +46,16 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
|
|||
|
||||
override public func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
self.navigationItem.title = NSLocalizedString("MESSAGE_APPROVAL_DIALOG_TITLE",
|
||||
comment: "Title for the 'message approval' dialog.")
|
||||
|
||||
self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .stop, target: self, action: #selector(cancelPressed))
|
||||
sendButton = UIBarButtonItem(title: NSLocalizedString("SEND_BUTTON_TITLE",
|
||||
comment: "Label for the send button in the conversation view."),
|
||||
style: .plain,
|
||||
target: self,
|
||||
action: #selector(sendPressed))
|
||||
self.navigationItem.rightBarButtonItem = sendButton
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,12 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
|
|||
sendButton.isEnabled = textView.text.count > 0
|
||||
}
|
||||
|
||||
override public func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
updateSendButton()
|
||||
}
|
||||
|
||||
// MARK: - Create Views
|
||||
|
||||
public override func loadView() {
|
||||
|
|
|
@ -976,7 +976,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
|
|||
messages:deviceMessages
|
||||
relay:recipient.relay
|
||||
timeStamp:message.timestamp];
|
||||
if (TSSocketManager.sharedManager.canMakeRequests) {
|
||||
if (CurrentAppContext().isMainApp && TSSocketManager.sharedManager.canMakeRequests) {
|
||||
[TSSocketManager.sharedManager makeRequest:request
|
||||
success:^(id _Nullable responseObject) {
|
||||
[self messageSendDidSucceed:message
|
||||
|
|
Loading…
Reference in New Issue