Skip to content

Commit

Permalink
Updated behavior of file card deletion to prevent compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzahi12345 committed Apr 11, 2020
1 parent b5a82b9 commit eddc255
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/file-card/file-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ export class FileCardComponent implements OnInit {
deleteFile(blacklistMode = false) {
if (!this.isPlaylist) {
this.postsService.deleteFile(this.uid, this.isAudio, blacklistMode).subscribe(result => {
if (result === true) {
if (result) {
this.openSnackBar('Delete success!', 'OK.');
this.removeFile.emit(this.name);
} else {
this.openSnackBar('Delete failed!', 'OK.');
}
}, err => {
this.openSnackBar('Delete failed!', 'OK.');
});
} else {
this.removeFile.emit(this.name);
Expand Down

0 comments on commit eddc255

Please sign in to comment.