mirror of
https://github.com/Boof2015/astra-mobile.git
synced 2026-08-20 20:49:47 +02:00
fix softlocking library
This commit is contained in:
@@ -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 },
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user