perf(library): lazy-load collections and dispose queries

This commit is contained in:
zarzet
2026-07-15 21:32:43 +07:00
parent 7f1c3e60db
commit 17dbcc1338
11 changed files with 217 additions and 85 deletions
+8 -4
View File
@@ -382,10 +382,14 @@ extension _QueueTabNavigation on _QueueTabState {
);
}
final firstCoverUrl = playlist.tracks
.where((e) => e.track.coverUrl != null && e.track.coverUrl!.isNotEmpty)
.map((e) => e.track.coverUrl!)
.firstOrNull;
final firstCoverUrl =
playlist.tracks
.where(
(e) => e.track.coverUrl != null && e.track.coverUrl!.isNotEmpty,
)
.map((e) => e.track.coverUrl!)
.firstOrNull ??
playlist.previewCover;
if (firstCoverUrl != null) {
// Guard against local file paths that may have been stored as coverUrl