mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-05-27 10:02:29 +02:00
fix: remove deleted local library item from provider state after file deletion
When deleting a non-CUE local library track from the metadata screen, only the file was removed but the library database entry and provider state were left untouched, causing the track to persist in the library UI. Now calls removeItem() on localLibraryProvider after deleteFile().
This commit is contained in:
@@ -3851,6 +3851,11 @@ class _TrackMetadataScreenState extends ConsumerState<TrackMetadataScreen> {
|
||||
} catch (e) {
|
||||
debugPrint('Failed to delete file: $e');
|
||||
}
|
||||
if (_localLibraryItem != null) {
|
||||
await ref
|
||||
.read(localLibraryProvider.notifier)
|
||||
.removeItem(_localLibraryItem!.id);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user