Change file tag display to be sorted alphabetically

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent c3a0f804cf
commit 9bd0e5920d

@ -62,13 +62,12 @@ export class SearchTabComponent implements OnInit {
async onFileSelect(file: File | undefined) {
if (file) {
await this.showFileDetails([file]);
} else {
this.tags = [];
}
}
async showFileDetails(files: File[]) {
this.tags = await this.tagService.getTagsForFiles(files.map(f => f.hash));
this.tags = await this.tagService.getTagsForFiles(files.map(f => f.hash))
this.tags = this.tags.sort((a, b) => a.getNormalizedOutput().localeCompare(b.getNormalizedOutput()));
}
async addSearchTagFromList(event: MatSelectionListChange) {

Loading…
Cancel
Save