Skip to content

Commit

Permalink
Use DismissAction in EditGroupSubject
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrfennell authored and tmolitor-stud-tu committed Sep 10, 2024
1 parent 3f8c806 commit 26d64a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Monal/Classes/EditGroupSubject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct EditGroupSubject: View {
private let account: xmpp?
@State private var subject: String

@Environment(\.presentationMode) var presentationMode
@Environment(\.dismiss) var dismiss
//@Environment(\.dismiss) var dismiss

init(contact: ObservableKVOWrapper<MLContact>) {
Expand All @@ -37,13 +37,13 @@ struct EditGroupSubject: View {
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button("Abort") {
self.presentationMode.wrappedValue.dismiss()
self.dismiss()
}
}
ToolbarItem(placement: .confirmationAction) {
Button("Done") {
self.account!.mucProcessor.changeSubject(ofMuc: contact.contactJid, to: self.subject)
self.presentationMode.wrappedValue.dismiss()
self.dismiss()
}
}
}
Expand Down

0 comments on commit 26d64a8

Please sign in to comment.