Skip to content

Commit

Permalink
Remove sheet dismisser from AccountPicker
Browse files Browse the repository at this point in the history
The SheetDismisserProtocol was not used, so there is no need for a
corresponding DismissAction.
  • Loading branch information
matthewrfennell authored and tmolitor-stud-tu committed Jul 1, 2024
1 parent 8ac87d9 commit 9419c19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions Monal/Classes/AccountPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

struct AccountPicker: View {
let delegate: SheetDismisserProtocol
let contacts: [MLContact]
let callType: MLCallType
#if IS_ALPHA
Expand All @@ -18,8 +17,7 @@ struct AccountPicker: View {
let appLogoId = "AppLogo"
#endif

init(delegate:SheetDismisserProtocol, contacts:[MLContact], callType: MLCallType) {
self.delegate = delegate
init(contacts:[MLContact], callType: MLCallType) {
self.contacts = contacts
self.callType = callType
}
Expand Down Expand Up @@ -63,8 +61,7 @@ struct AccountPicker: View {
}

struct AccountPicker_Previews: PreviewProvider {
static var delegate = SheetDismisserProtocol()
static var previews: some View {
AccountPicker(delegate:delegate, contacts:[MLContact.makeDummyContact(0)], callType:.audio)
AccountPicker(contacts:[MLContact.makeDummyContact(0)], callType:.audio)
}
}
2 changes: 1 addition & 1 deletion Monal/Classes/SwiftuiHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ class SwiftuiInterface : NSObject {
let delegate = SheetDismisserProtocol()
let host = UIHostingController(rootView:AnyView(EmptyView()))
delegate.host = host
host.rootView = AnyView(AddTopLevelNavigation(withDelegate:delegate, to:AccountPicker(delegate:delegate, contacts:contacts, callType:MLCallType(rawValue: callType)!)))
host.rootView = AnyView(AddTopLevelNavigation(withDelegate:delegate, to:AccountPicker(contacts:contacts, callType:MLCallType(rawValue: callType)!)))
return host
}

Expand Down

0 comments on commit 9419c19

Please sign in to comment.