fix: several small fixes
🏗️ Build and Test JellyTau / Run Tests (pull_request) Successful in 3m51s
Traceability Validation / Check Requirement Traces (pull_request) Successful in 22s
🏗️ Build and Test JellyTau / Build Android APK (pull_request) Successful in 18m26s

This commit is contained in:
2026-06-25 20:02:01 +02:00
parent 1836615dc0
commit 2811e1b7ca
6 changed files with 69 additions and 37 deletions
+6 -12
View File
@@ -3,11 +3,11 @@
import { goto } from "$app/navigation";
import { page } from "$app/stores";
import { commands } from "$lib/api/bindings";
import { platform } from "@tauri-apps/plugin-os";
import { auth, isAuthenticated, isLoading as isAuthLoading, currentUser } from "$lib/stores/auth";
import { library } from "$lib/stores/library";
import { currentMedia, isPlaying, playbackPosition, playbackDuration, shouldShowAudioMiniPlayer } from "$lib/stores/player";
import { isShuffle, repeatMode, hasNext as hasNextStore, hasPrevious as hasPreviousStore } from "$lib/stores/queue";
import { isAndroid } from "$lib/stores/appState";
import { useScrollGuard } from "$lib/composables/useScrollGuard";
import Search from "$lib/components/Search.svelte";
import MiniPlayer from "$lib/components/player/MiniPlayer.svelte";
@@ -31,17 +31,11 @@
const repeat = $derived($repeatMode);
const hasNext = $derived($hasNextStore);
const hasPrevious = $derived($hasPreviousStore);
let isAndroid = $state(false);
// Platform comes from the shared appState store (set once in the root layout),
// so this layout and the root layout never disagree about Android — otherwise
// both can suppress their mini players and none appears. See $lib/stores/appState.
onMount(() => {
// Detect platform
try {
const platformName = platform();
isAndroid = platformName === "android";
} catch (err) {
console.error("Platform detection failed:", err);
}
return () => {
scrollGuard.cleanup();
};
@@ -213,7 +207,7 @@
<!-- Main content (with padding for bottom nav bar and mini player) -->
<main
class="flex-1 overflow-y-auto p-4"
style="padding-bottom: {$shouldShowAudioMiniPlayer ? (isAndroid ? '11rem' : '7rem') : '5rem'}; overscroll-behavior: contain"
style="padding-bottom: {$shouldShowAudioMiniPlayer ? ($isAndroid ? '11rem' : '7rem') : '5rem'}; overscroll-behavior: contain"
onscroll={scrollGuard.onScroll}
>
{@render children()}
@@ -221,7 +215,7 @@
<!-- Mini Player (only show on non-Android platforms - Android uses global mini player) -->
<!-- Hide on player page since full player is already there -->
{#if !isAndroid && !$page.url.pathname.startsWith('/player/')}
{#if !$isAndroid && !$page.url.pathname.startsWith('/player/')}
<MiniPlayer
media={$currentMedia}
isPlaying={$isPlaying}