Change selector names because apparently App Store Connect thinks the old ones are SPI now

This commit is contained in:
Shadowfacts 2022-04-25 16:30:44 -04:00
parent 0e888d35eb
commit d611aeb035
2 changed files with 10 additions and 10 deletions

View File

@ -66,9 +66,9 @@ class ComposeHostingController: UIHostingController<ComposeContainerView> {
inputAccessoryToolbar.isAccessibilityElement = true
setupToolbarItems(toolbar: inputAccessoryToolbar, input: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardDidHide(_:)), name: UIResponder.keyboardDidHideNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(composeKeyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(composeKeyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(composeKeyboardDidHide(_:)), name: UIResponder.keyboardDidHideNotification, object: nil)
// add the height of the toolbar itself to the bottom of the safe area so content inside SwiftUI ScrollView doesn't underflow it
updateAdditionalSafeAreaInsets()
@ -190,7 +190,7 @@ class ComposeHostingController: UIHostingController<ComposeContainerView> {
additionalSafeAreaInsets = UIEdgeInsets(top: 0, left: 0, bottom: toolbarHeight, right: 0)
}
@objc private func keyboardWillShow(_ notification: Foundation.Notification) {
@objc private func composeKeyboardWillShow(_ notification: Foundation.Notification) {
keyboardWillShow(accessoryView: inputAccessoryToolbar, notification: notification)
}
@ -201,7 +201,7 @@ class ComposeHostingController: UIHostingController<ComposeContainerView> {
accessoryView.isHidden = false
}
@objc private func keyboardWillHide(_ notification: Foundation.Notification) {
@objc private func composeKeyboardWillHide(_ notification: Foundation.Notification) {
keyboardWillHide(accessoryView: inputAccessoryToolbar, notification: notification)
}
@ -233,7 +233,7 @@ class ComposeHostingController: UIHostingController<ComposeContainerView> {
}
}
@objc private func keyboardDidHide(_ notification: Foundation.Notification) {
@objc private func composeKeyboardDidHide(_ notification: Foundation.Notification) {
keyboardDidHide(accessoryView: inputAccessoryToolbar, notification: notification)
}

View File

@ -30,7 +30,7 @@ class ListTimelineViewController: TimelineTableViewController {
override func viewDidLoad() {
super.viewDidLoad()
navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .edit, target: self, action: #selector(editButtonPressed))
navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .edit, target: self, action: #selector(editListButtonPressed))
}
override func viewDidAppear(_ animated: Bool) {
@ -43,18 +43,18 @@ class ListTimelineViewController: TimelineTableViewController {
func presentEdit(animated: Bool) {
let editListAccountsController = EditListAccountsViewController(list: list, mastodonController: mastodonController)
editListAccountsController.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(doneButtonPressed))
editListAccountsController.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(editListDoneButtonPressed))
let navController = UINavigationController(rootViewController: editListAccountsController)
present(navController, animated: animated)
}
// MARK: - Interaction
@objc func editButtonPressed() {
@objc func editListButtonPressed() {
presentEdit(animated: true)
}
@objc func doneButtonPressed() {
@objc func editListDoneButtonPressed() {
dismiss(animated: true)
// todo: show loading indicator