Add global search filtering

This commit is contained in:
Ilya Laktyushin
2020-08-21 15:18:34 +03:00
parent 9b342df78d
commit edd2db706b
5 changed files with 43 additions and 26 deletions

View File

@@ -30,6 +30,7 @@ public func tagsForStoreMessage(incoming: Bool, attributes: [MessageAttribute],
if let _ = attachment as? TelegramMediaImage {
if !isSecret {
tags.insert(.photoOrVideo)
tags.insert(.photo)
}
} else if let file = attachment as? TelegramMediaFile {
var refinedTag: MessageTags? = .file
@@ -41,7 +42,7 @@ public func tagsForStoreMessage(incoming: Bool, attributes: [MessageAttribute],
refinedTag = .voiceOrInstantVideo
} else {
if !isSecret {
refinedTag = .photoOrVideo
refinedTag = [.photoOrVideo, .video]
} else {
refinedTag = nil
}