Skip to content

Commit

Permalink
Move ContactsView init method to top
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrfennell authored and tmolitor-stud-tu committed Sep 7, 2024
1 parent 78b23de commit 2f39ad1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Monal/Classes/ContactsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ struct ContactsView: View {
@State private var searchText: String = ""
@State private var selectedContactForContactDetails: ObservableKVOWrapper<MLContact>? = nil

init(contacts: Contacts, delegate: SheetDismisserProtocol, dismissWithContact: @escaping (MLContact) -> ()) {
self.contacts = contacts
self.delegate = delegate
self.dismissWithContact = dismissWithContact
}

private static func shouldDisplayContact(contact: MLContact) -> Bool {
#if IS_QUICKSY
return true
Expand Down Expand Up @@ -128,12 +134,6 @@ struct ContactsView: View {
return jid.contains(search) || name.contains(search)
}

init(contacts: Contacts, delegate: SheetDismisserProtocol, dismissWithContact: @escaping (MLContact) -> ()) {
self.contacts = contacts
self.delegate = delegate
self.dismissWithContact = dismissWithContact
}

var body: some View {
List {
ForEach(searchResults, id: \.self) { contact in
Expand Down

0 comments on commit 2f39ad1

Please sign in to comment.