diff --git a/Sources/ContactListFeature/ViewModels/CreateGroupViewModel.swift b/Sources/ContactListFeature/ViewModels/CreateGroupViewModel.swift index 70485e37b03b91b5d98d6f59f53c9f2a4dafa901..67e70645ed6c0d00f02862bdb02f199d3d735d9d 100644 --- a/Sources/ContactListFeature/ViewModels/CreateGroupViewModel.swift +++ b/Sources/ContactListFeature/ViewModels/CreateGroupViewModel.swift @@ -44,6 +44,7 @@ final class CreateGroupViewModel { init() { session.dbManager.fetchContactsPublisher(.init(authStatus: [.friend])) .assertNoFailure() + .map { $0.filter { $0.id != self.session.myId }} .map { $0.sorted(by: { $0.username! < $1.username! })} .sink { [unowned self] in allContacts = $0 diff --git a/Sources/SearchFeature/Controllers/SearchController.swift b/Sources/SearchFeature/Controllers/SearchController.swift index 7f4250766c733d97139cd3c54d43c556adf88c7a..795c60009cb827d2aacca5d3e27eb89e7114b26b 100644 --- a/Sources/SearchFeature/Controllers/SearchController.swift +++ b/Sources/SearchFeature/Controllers/SearchController.swift @@ -258,7 +258,7 @@ extension SearchController { spacingAfter: 20 ) - var subtitleFragment = "Share your information with #\(contact.username)" + var subtitleFragment = "Share your information with #\(contact.username ?? "")" if let email = contact.email { subtitleFragment.append(contentsOf: " (\(email))#")