fix softlocking library

This commit is contained in:
Boof2015
2026-07-07 12:47:52 -04:00
parent 31f81282e0
commit 5f02e3e222
6 changed files with 15 additions and 28 deletions
+1 -1
View File
@@ -434,7 +434,7 @@ export default function HomeScreen() {
const openAlbum = (album: Album) => {
router.push({
pathname: '/library/album/[key]',
params: { key: album.identity_key, from: 'home' },
params: { key: album.identity_key },
});
};
+2 -2
View File
@@ -39,11 +39,11 @@ function DiscHeader({ disc }: { disc: number }) {
export default function AlbumScreen() {
const colors = useColors();
const { key, from } = useLocalSearchParams<{ key: string; from?: string }>();
const { key } = useLocalSearchParams<{ key: string }>();
const albums = useLibraryStore((s) => s.albums);
const allTracks = useLibraryStore((s) => s.tracks);
const currentPath = usePlayerStore((s) => s.currentTrack?.path);
const handleBack = useLibraryDetailBack(from);
const handleBack = useLibraryDetailBack();
const insets = useSafeAreaInsets();
const { scrollY, heroFaded, collapsed, onScroll, scrollEventThrottle, expandedHeight, onHeroBlockLayout } =
useDetailCollapse();
+2 -2
View File
@@ -64,8 +64,8 @@ export default function ArtistScreen() {
const styles = useStyles();
const colors = useColors();
const router = useRouter();
const { name = 'Artist', from } = useLocalSearchParams<{ name: string; from?: string }>();
const handleBack = useLibraryDetailBack(from);
const { name = 'Artist' } = useLocalSearchParams<{ name: string }>();
const handleBack = useLibraryDetailBack();
const insets = useSafeAreaInsets();
const { scrollY, heroFaded, collapsed, onScroll, scrollEventThrottle, expandedHeight, onHeroBlockLayout } =
useDetailCollapse();
+3 -3
View File
@@ -76,8 +76,8 @@ export default function PlaylistScreen() {
const styles = useStyles();
const colors = useColors();
const router = useRouter();
const { id, from } = useLocalSearchParams<{ id: string; from?: string }>();
const handleBack = useLibraryDetailBack(from);
const { id } = useLocalSearchParams<{ id: string }>();
const handleBack = useLibraryDetailBack();
const isFavorites = id === 'favorites';
const playlistId = isFavorites ? null : Number(id);
@@ -185,7 +185,7 @@ export default function PlaylistScreen() {
void (async () => {
try {
await deletePlaylist(target.id);
router.back();
handleBack();
} catch (err) {
Alert.alert('Delete failed', errorMessage(err));
}