Many improvemtns and fixes related to decoupling of svelte and rust on android.
🏗️ Build and Test JellyTau / Run Tests (push) Failing after 18s
🏗️ Build and Test JellyTau / Build Android APK (push) Has been skipped
Traceability Validation / Check Requirement Traces (push) Failing after 2s

This commit is contained in:
2026-02-28 19:50:47 +01:00
parent 07f3bf04ca
commit e8e37649fa
53 changed files with 2309 additions and 792 deletions
+13 -1
View File
@@ -1,13 +1,17 @@
<script lang="ts">
import { onMount } from "svelte";
import { onMount, getContext } from "svelte";
import { goto } from "$app/navigation";
import type { Library, MediaItem } from "$lib/api/types";
import { library, libraries, libraryItems, isLibraryLoading, currentLibrary, selectedGenres } from "$lib/stores/library";
import { isServerReachable } from "$lib/stores/connectivity";
import type { useScrollGuard } from "$lib/composables/useScrollGuard";
import LibraryGrid from "$lib/components/library/LibraryGrid.svelte";
import MediaCard from "$lib/components/library/MediaCard.svelte";
import GenreFilter from "$lib/components/library/GenreFilter.svelte";
// Scroll guard from layout - prevents accidental taps during scrolling (Android)
const scrollGuard = getContext<ReturnType<typeof useScrollGuard>>("scrollGuard");
let searchResults = $derived($library.searchResults);
let searchQuery = $derived($library.searchQuery);
@@ -48,6 +52,9 @@
});
async function handleLibraryClick(lib: Library) {
// Prevent accidental taps during scrolling (Android)
if (scrollGuard.isScrollActive()) return;
// Route to dedicated music library page
if (lib.collectionType === "music") {
library.setCurrentLibrary(lib);
@@ -70,6 +77,9 @@
}
function handleItemClick(item: MediaItem | Library) {
// Prevent accidental taps during scrolling (Android)
if (scrollGuard.isScrollActive()) return;
if ("type" in item) {
// It's a MediaItem
const mediaItem = item as MediaItem;
@@ -102,6 +112,8 @@
}
function goBackToLibraries() {
// Prevent accidental taps during scrolling (Android)
if (scrollGuard.isScrollActive()) return;
library.setCurrentLibrary(null);
}
</script>