Fix keyboard getting dismissed when scrolling autocomplete suggestions

Presentation controller takes care of dismissing keyboard when swipe
down in main scroll view starts
This commit is contained in:
Shadowfacts 2021-11-20 11:28:37 -05:00
parent eccb1043db
commit 57cb0614a9
1 changed files with 0 additions and 6 deletions

View File

@ -65,7 +65,6 @@ struct ComposeView: View {
autocompleteSuggestions
}
.onAppear(perform: self.didAppear)
.navigationBarTitle("Compose")
.actionSheet(isPresented: $uiState.isShowingSaveDraftSheet, content: self.saveAndCloseSheet)
.alert(isPresented: $isShowingPostErrorAlert) {
@ -154,11 +153,6 @@ struct ComposeView: View {
.disabled(!postButtonEnabled)
}
private func didAppear() {
let proxy = UIScrollView.appearance(whenContainedInInstancesOf: [ComposeHostingController.self])
proxy.keyboardDismissMode = .interactive
}
private func cancel() {
if Preferences.shared.automaticallySaveDrafts {
// draft is already stored in drafts manager, drafts manager is saved by ComposeHostingController.viewWillDisappear