@ -227,6 +227,8 @@ public class ShareViewController: UINavigationController, SAELoadViewDelegate, S
// S i g n a l s N a v i g a t i o n C o n t r o l l e r * n a v i g a t i o n C o n t r o l l e r =
// [ [ S i g n a l s N a v i g a t i o n C o n t r o l l e r a l l o c ] i n i t W i t h R o o t V i e w C o n t r o l l e r : h o m e V i e w ] ;
// s e l f . w i n d o w . r o o t V i e w C o n t r o l l e r = n a v i g a t i o n C o n t r o l l e r ;
presentConversationPicker ( )
} else {
showNotRegisteredView ( )
}
@ -349,18 +351,14 @@ public class ShareViewController: UINavigationController, SAELoadViewDelegate, S
self . extensionContext ! . completeRequest ( returningItems : [ ] , completionHandler : nil )
}
public func shareExtensionIsReady ( ) {
self . presentConversationPicker ( )
}
// MARK: H e l p e r s
private func presentConversationPicker ( ) {
let conversationPicker = SendExternalFileViewController ( )
buildAttachment ( ) . then { attachment -> Void in
conversationPicker . attachment = attachment
self . pushViewController ( conversationPicker , animated : fals e)
Logger . info ( " presented conversation picker with attachment " )
self . pushViewController ( conversationPicker , animated : tru e)
Logger . info ( " presented conversation picker with attachment : \( attachment ) " )
} . catch { error in
OWSAlerts . showAlert ( withTitle : NSLocalizedString ( " SHARE_EXTENSION_UNABLE_TO_BUILD_ATTACHMENT_ALERT_TITLE " , comment : " Shown when trying to share content to a Signal user for the share extension. Followed by failure details. " ) ,
message : error . localizedDescription ,