Search: Add separator.

webapi: Search results and explore: set tag TagSharedByCount if file owner is active peer.
This commit is contained in:
Kleissner
2021-12-14 02:13:04 +01:00
parent 281622aa49
commit e41e6820bc
3 changed files with 12 additions and 5 deletions

View File

@@ -39,6 +39,8 @@ func queryRecentShared(backend *core.Backend, fileType int, limitPeer, limitTota
for _, record := range blockDecoded.RecordsDecoded {
if file, ok := record.(blockchain.BlockRecordFile); ok && isFileTypeMatchBlock(&file, fileType) {
file.Tags = append(file.Tags, blockchain.TagFromNumber(blockchain.TagSharedByCount, 1))
// found a new file! append.
if filesFromPeer < limitPeer {
files = append(files, file)