mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-26 11:31:01 +02:00
fix(library): retain records when deletion fails
This commit is contained in:
@@ -476,10 +476,9 @@ extension _QueueTabSelectionActions on _QueueTabState {
|
||||
for (final id in _selectedIds) {
|
||||
final item = itemsById[id];
|
||||
if (item != null) {
|
||||
try {
|
||||
final cleanPath = _cleanFilePath(item.filePath);
|
||||
await deleteFile(cleanPath);
|
||||
} catch (_) {}
|
||||
final cleanPath = _cleanFilePath(item.filePath);
|
||||
final fileDeleted = await deleteFile(cleanPath);
|
||||
if (!fileDeleted) continue;
|
||||
|
||||
if (item.source == LibraryItemSource.downloaded) {
|
||||
historyNotifier.removeFromHistory(item.historyItem!.id);
|
||||
|
||||
Reference in New Issue
Block a user