Commit Graph

13 Commits

Author SHA1 Message Date
skalthoff
cb068da8bf enhance player queue management with Zustand store integration. (#574)
What is the change

    Implement persistent player queue state with a dedicated Zustand store (MMKV-backed): queue, currentTrack, currentIndex, shuffled, unShuffledQueue, and queueRef.
    Restore the queue on app start: new initialization reads persisted state and rebuilds the TrackPlayer queue and active index.
    Unify queue mutations to keep React Native Track Player and the persisted store in sync:
        Loading a new queue sets queueRef, honors shuffle, computes start index, and writes to both RNTP and store.
        "Play Next" and "Add to Queue" update RNTP, the live queue, and unShuffledQueue consistently.
        Active track/index changes now propagate to the store and query cache.
    Tighten/refine player query/invalidations so UI reflects the latest RNTP state.
    Minor housekeeping in config/scripts to support the above (ESLint flat config, metro/jest/script updates).

What does this address

    Fixes queue not restoring after relaunch or crash; playback position and the current track persist correctly.
    Preserves shuffle state and the original unshuffled ordering for reliable shuffle toggle behavior.
    Ensures "Play Next"/"Add to Queue" behave consistently with what the user sees, avoiding duplication or desyncs.
    Reduces UI state drift by syncing RNTP events to both React Query and persistent store.


Co-authored-by: Violet Caulfield <42452695+anultravioletaurora@users.noreply.github.com>
2025-10-24 05:41:22 -05:00
Violet Caulfield
34382d45a9 UI Overflow Fixes, Move Source to src Folder (#311)
Fix issue where player elements would be falling off of the screen

Move source files into `src` folder for project organization
2025-04-30 10:40:31 -05:00
Violet Caulfield
5754a3d236 Upgrade to React Native's New Architecture (#302)
Makes the UI operate more synchronously (read: fast 🔥🔥🔥)

Upgrades several dependencies
2025-04-30 03:30:24 -05:00
Violet Caulfield
5ca00df6f7 [skip actions]
run prettier
2025-04-12 10:16:10 -05:00
Violet Caulfield
b47148dd9f fix metro config 2025-01-20 09:19:07 -06:00
Violet Caulfield
b71088a657 fix metro config? 2024-11-29 11:03:26 -06:00
Violet Caulfield
fd31873983 plz 2024-10-17 23:20:32 -05:00
Violet Caulfield
13cae0bc44 idk 2024-10-17 23:18:19 -05:00
Violet Caulfield
fb71f81668 tamagui all the way 2024-10-17 21:23:53 -05:00
Violet Caulfield
ea0f58f5e6 does this fix that watchman error? 2024-10-17 10:09:54 -05:00
Violet Caulfield
7815173e03 update icon
metro config fix?
2024-10-17 08:56:47 -05:00
Violet Caulfield
f94c980c59 maybe getting some tamagui stuff to happen? 2024-10-14 21:55:07 -05:00
Violet Caulfield
dbff669735 init project and add jellyfin sdk 2024-08-25 21:02:30 -05:00