mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-19 01:31:29 +03:00
Updated behavior of file card deletion to prevent compilation error
This commit is contained in:
@@ -49,12 +49,14 @@ export class FileCardComponent implements OnInit {
|
|||||||
deleteFile(blacklistMode = false) {
|
deleteFile(blacklistMode = false) {
|
||||||
if (!this.isPlaylist) {
|
if (!this.isPlaylist) {
|
||||||
this.postsService.deleteFile(this.uid, this.isAudio, blacklistMode).subscribe(result => {
|
this.postsService.deleteFile(this.uid, this.isAudio, blacklistMode).subscribe(result => {
|
||||||
if (result === true) {
|
if (result) {
|
||||||
this.openSnackBar('Delete success!', 'OK.');
|
this.openSnackBar('Delete success!', 'OK.');
|
||||||
this.removeFile.emit(this.name);
|
this.removeFile.emit(this.name);
|
||||||
} else {
|
} else {
|
||||||
this.openSnackBar('Delete failed!', 'OK.');
|
this.openSnackBar('Delete failed!', 'OK.');
|
||||||
}
|
}
|
||||||
|
}, err => {
|
||||||
|
this.openSnackBar('Delete failed!', 'OK.');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.removeFile.emit(this.name);
|
this.removeFile.emit(this.name);
|
||||||
|
|||||||
Reference in New Issue
Block a user