diff --git a/cspell.json b/cspell.json index 44f998e9e..6401bf8bd 100644 --- a/cspell.json +++ b/cspell.json @@ -35,7 +35,8 @@ "xpath", "tooltip", "tooltips", - "unindent" + "unindent", + "exif" ], "dictionaries": [ "html" diff --git a/src/app/components/info-drawer/info-drawer.component.ts b/src/app/components/info-drawer/info-drawer.component.ts index 57baa23e2..c6df10aa0 100644 --- a/src/app/components/info-drawer/info-drawer.component.ts +++ b/src/app/components/info-drawer/info-drawer.component.ts @@ -74,11 +74,24 @@ export class InfoDrawerComponent implements OnChanges { // workaround for Favorite files this.loadNodeInfo(entry.id); } else { - this.displayNode = this.node.entry; + // workaround Recent + if (this.isTypeImage(entry) && !this.hasAspectNames(entry)) { + this.loadNodeInfo(this.node.entry.id); + } else { + this.displayNode = this.node.entry; + } } } } + private hasAspectNames(entry: MinimalNodeEntryEntity) { + return entry.aspectNames && entry.aspectNames.includes('exif:exif'); + } + + private isTypeImage(entry) { + return entry.content.mimeType.includes('image/'); + } + private loadNodeInfo(nodeId: string) { if (nodeId) { this.isLoading = true; diff --git a/src/app/directives/document-list.directive.ts b/src/app/directives/document-list.directive.ts index e2ca0d6b8..28ab6e701 100644 --- a/src/app/directives/document-list.directive.ts +++ b/src/app/directives/document-list.directive.ts @@ -51,7 +51,7 @@ export class DocumentListDirective implements OnInit, OnDestroy { ) {} ngOnInit() { - this.documentList.includeFields = ['isFavorite']; + this.documentList.includeFields = ['isFavorite', 'aspectNames']; this.documentList.allowDropFiles = false; if (this.sortingPreferenceKey) {