mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-29 05:29:08 +00:00
add notes preset tag
This commit is contained in:
@@ -36,6 +36,7 @@ enum PresetTag: Int, Identifiable, CaseIterable, Equatable {
|
||||
case contacts = 1
|
||||
case groups = 2
|
||||
case business = 3
|
||||
case notes = 4
|
||||
|
||||
var id: Int { rawValue }
|
||||
}
|
||||
@@ -829,6 +830,7 @@ struct ChatTagsView: View {
|
||||
case .contacts: (active ? "person.fill" : "person", "Contacts")
|
||||
case .groups: (active ? "person.2.fill" : "person.2", "Groups")
|
||||
case .business: (active ? "briefcase.fill" : "briefcase", "Businesses")
|
||||
case .notes: (active ? "folder.fill" : "folder", "Notes")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -871,6 +873,11 @@ func presetTagMatchesChat(_ tag: PresetTag, _ chatInfo: ChatInfo) -> Bool {
|
||||
}
|
||||
case .business:
|
||||
chatInfo.groupInfo?.businessChat?.chatType == .business
|
||||
case .notes:
|
||||
switch chatInfo {
|
||||
case .local: true
|
||||
default: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user