fix: album download menu not updating in grid views
- Force Map reactivity by re-assigning after .set() - Add missing downloadStateVersion effect in SearchView - Ensures download menu updates across all grid views cp
This commit is contained in:
1 parent
6cc625c0f1
commit
f15316533f
3 files changed
+9
No files matched your search
@@ -126,6 +126,7 @@
|
|||||||
try {
|
try {
|
||||||
const isDownloaded = await checkAlbumFullyDownloaded(albumId);
|
const isDownloaded = await checkAlbumFullyDownloaded(albumId);
|
||||||
albumDownloadStatuses.set(albumId, isDownloaded);
|
albumDownloadStatuses.set(albumId, isDownloaded);
|
||||||
|
albumDownloadStatuses = albumDownloadStatuses;
|
||||||
return isDownloaded;
|
return isDownloaded;
|
||||||
} catch {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -148,6 +148,7 @@
|
|||||||
try {
|
try {
|
||||||
const isDownloaded = await checkAlbumFullyDownloaded(albumId);
|
const isDownloaded = await checkAlbumFullyDownloaded(albumId);
|
||||||
albumDownloadStatuses.set(albumId, isDownloaded);
|
albumDownloadStatuses.set(albumId, isDownloaded);
|
||||||
|
albumDownloadStatuses = albumDownloadStatuses;
|
||||||
return isDownloaded;
|
return isDownloaded;
|
||||||
} catch {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -171,6 +171,7 @@
|
|||||||
try {
|
try {
|
||||||
const isDownloaded = await checkAlbumFullyDownloaded(albumId);
|
const isDownloaded = await checkAlbumFullyDownloaded(albumId);
|
||||||
albumDownloadStatuses.set(albumId, isDownloaded);
|
albumDownloadStatuses.set(albumId, isDownloaded);
|
||||||
|
albumDownloadStatuses = albumDownloadStatuses;
|
||||||
return isDownloaded;
|
return isDownloaded;
|
||||||
} catch {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
@@ -187,6 +188,12 @@
|
|||||||
return albumDownloadStatuses.get(albumId) || false;
|
return albumDownloadStatuses.get(albumId) || false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$effect(() => {
|
||||||
|
if (downloadStateVersion !== undefined && albumResults) {
|
||||||
|
loadAllAlbumDownloadStatuses(albumResults.items);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
async function performSearch() {
|
async function performSearch() {
|
||||||
if (!query.trim()) return;
|
if (!query.trim()) return;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user