Fixed a couple of action sheets which could crash on iPad

pull/796/head
Morgan Pretty 2 years ago
parent 52ba016b80
commit bead5ca1e6

@ -1526,6 +1526,7 @@ extension ConversationVC:
} }
} }
Modal.setupForIPadIfNeeded(sheet, targetView: self.view)
present(sheet, animated: true, completion: nil) present(sheet, animated: true, completion: nil)
} }
@ -2376,6 +2377,7 @@ extension ConversationVC {
}) })
alertVC.addAction(UIAlertAction(title: "TXT_CANCEL_TITLE".localized(), style: .cancel, handler: nil)) alertVC.addAction(UIAlertAction(title: "TXT_CANCEL_TITLE".localized(), style: .cancel, handler: nil))
Modal.setupForIPadIfNeeded(sheet, targetView: self.view)
self.present(alertVC, animated: true, completion: nil) self.present(alertVC, animated: true, completion: nil)
} }
@ -2423,6 +2425,7 @@ extension ConversationVC {
}) })
alertVC.addAction(UIAlertAction(title: "TXT_CANCEL_TITLE".localized(), style: .cancel, handler: nil)) alertVC.addAction(UIAlertAction(title: "TXT_CANCEL_TITLE".localized(), style: .cancel, handler: nil))
Modal.setupForIPadIfNeeded(alertVC, targetView: self.view)
self.present(alertVC, animated: true, completion: nil) self.present(alertVC, animated: true, completion: nil)
} }
} }

@ -449,6 +449,8 @@ class MessageRequestsViewController: BaseVC, UITableViewDelegate, UITableViewDat
} }
}) })
alertVC.addAction(UIAlertAction(title: "TXT_CANCEL_TITLE".localized(), style: .cancel, handler: nil)) alertVC.addAction(UIAlertAction(title: "TXT_CANCEL_TITLE".localized(), style: .cancel, handler: nil))
Modal.setupForIPadIfNeeded(alertVC, targetView: self.view)
self.present(alertVC, animated: true, completion: nil) self.present(alertVC, animated: true, completion: nil)
} }
@ -470,6 +472,8 @@ class MessageRequestsViewController: BaseVC, UITableViewDelegate, UITableViewDat
}) })
alertVC.addAction(UIAlertAction(title: "TXT_CANCEL_TITLE".localized(), style: .cancel, handler: nil)) alertVC.addAction(UIAlertAction(title: "TXT_CANCEL_TITLE".localized(), style: .cancel, handler: nil))
Modal.setupForIPadIfNeeded(alertVC, targetView: self.view)
self.present(alertVC, animated: true, completion: nil) self.present(alertVC, animated: true, completion: nil)
} }
@ -501,6 +505,8 @@ class MessageRequestsViewController: BaseVC, UITableViewDelegate, UITableViewDat
}) })
alertVC.addAction(UIAlertAction(title: "TXT_CANCEL_TITLE".localized(), style: .cancel, handler: nil)) alertVC.addAction(UIAlertAction(title: "TXT_CANCEL_TITLE".localized(), style: .cancel, handler: nil))
Modal.setupForIPadIfNeeded(alertVC, targetView: self.view)
self.present(alertVC, animated: true, completion: nil) self.present(alertVC, animated: true, completion: nil)
} }
} }

Loading…
Cancel
Save