mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-24 02:33:20 +03:00
Fixed bug in file deletion where file indexes became stale
This commit is contained in:
@@ -250,6 +250,7 @@ export class RecentVideosComponent implements OnInit {
|
|||||||
if (result) {
|
if (result) {
|
||||||
this.postsService.openSnackBar('Delete success!', 'OK.');
|
this.postsService.openSnackBar('Delete success!', 'OK.');
|
||||||
this.files.splice(file.index, 1);
|
this.files.splice(file.index, 1);
|
||||||
|
for (let i = 0; i < this.files.length; i++) { this.files[i].index = i }
|
||||||
this.filterByProperty(this.filterProperty['property']);
|
this.filterByProperty(this.filterProperty['property']);
|
||||||
} else {
|
} else {
|
||||||
this.postsService.openSnackBar('Delete failed!', 'OK.');
|
this.postsService.openSnackBar('Delete failed!', 'OK.');
|
||||||
|
|||||||
Reference in New Issue
Block a user