Exclude FileHeaderEvent from note search results (direct note id search and free text)

This commit is contained in:
David Kaspar 2025-01-28 11:39:46 +01:00
parent 3e1e3e80fb
commit d825995ef4

View File

@ -1855,7 +1855,17 @@ object LocalCache {
if (key != null) {
val note = getNoteIfExists(key)
if (note != null) {
if ((note != null) &&
!(
note.event is GenericRepostEvent ||
note.event is RepostEvent ||
note.event is CommunityPostApprovalEvent ||
note.event is ReactionEvent ||
note.event is LnZapEvent ||
note.event is LnZapRequestEvent ||
note.event is FileHeaderEvent
)
) {
return listOfNotNull(note)
}
}
@ -1866,7 +1876,8 @@ object LocalCache {
note.event is CommunityPostApprovalEvent ||
note.event is ReactionEvent ||
note.event is LnZapEvent ||
note.event is LnZapRequestEvent
note.event is LnZapRequestEvent ||
note.event is FileHeaderEvent
) {
return@filter false
}
@ -1897,7 +1908,8 @@ object LocalCache {
addressable.event is CommunityPostApprovalEvent ||
addressable.event is ReactionEvent ||
addressable.event is LnZapEvent ||
addressable.event is LnZapRequestEvent
addressable.event is LnZapRequestEvent ||
addressable.event is FileHeaderEvent
) {
return@filter false
}