From adbe7f95d50b469aff63dd74895b2bf833704cd7 Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Tue, 21 Jun 2022 22:45:38 -0400 Subject: [PATCH] Fixed issue where reopening file info dialog after editing metadata would show stale data --- .../unified-file-card/unified-file-card.component.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/components/unified-file-card/unified-file-card.component.ts b/src/app/components/unified-file-card/unified-file-card.component.ts index a9cc7c9..6c4f658 100644 --- a/src/app/components/unified-file-card/unified-file-card.component.ts +++ b/src/app/components/unified-file-card/unified-file-card.component.ts @@ -9,7 +9,6 @@ import localeES from '@angular/common/locales/es'; import localeDE from '@angular/common/locales/de'; import localeZH from '@angular/common/locales/zh'; import localeNB from '@angular/common/locales/nb'; -import { DatabaseFile, Playlist } from 'api-types'; registerLocaleData(localeGB); registerLocaleData(localeFR); @@ -105,12 +104,16 @@ export class UnifiedFileCardComponent implements OnInit { } openFileInfoDialog() { - this.dialog.open(VideoInfoDialogComponent, { + const dialogRef = this.dialog.open(VideoInfoDialogComponent, { data: { file: this.file_obj, }, minWidth: '50vw' - }) + }); + + dialogRef.afterClosed().subscribe(() => { + this.file_obj = dialogRef.componentInstance.file; + }); } emitEditPlaylist() {