mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-30 21:29:36 +02:00
perf(library): batch album deletion and refresh once
This commit is contained in:
1 parent
c868aac2cc
commit
1ef81b4530
6 files changed
+224
-14
No files matched your search
@@ -1222,7 +1222,12 @@ class LocalLibraryNotifier extends Notifier<LocalLibraryState> {
|
||||
}
|
||||
|
||||
Future<void> removeItem(String id) async {
|
||||
await _db.delete(id);
|
||||
await removeItems([id]);
|
||||
}
|
||||
|
||||
Future<void> removeItems(Iterable<String> ids) async {
|
||||
if (ids.isEmpty) return;
|
||||
await _db.deleteByIds(ids);
|
||||
await _refreshSummaryFromStorage();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user