search: prioritize friends when autocompleting
Lightning-Address: fishcharlie@strike.me Closes: https://github.com/damus-io/damus/issues/1620 Signed-off-by: Charlie Fish <contact@charlie.fish> Reviewed-by: William Casarin <jb55@jb55.com> Signed-off-by: William Casarin <jb55@jb55.com> Changelog-Changed: Prioritize friends when autocompleting
This commit is contained in:
committed by
William Casarin
parent
f7946b1a7c
commit
eb41846bb9
@@ -10,6 +10,13 @@ import SwiftUI
|
||||
enum FriendType {
|
||||
case friend
|
||||
case fof
|
||||
|
||||
var priority: Int {
|
||||
switch self {
|
||||
case .friend: return 2
|
||||
case .fof: return 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func get_friend_type(contacts: Contacts, pubkey: Pubkey) -> FriendType? {
|
||||
|
||||
Reference in New Issue
Block a user