player, song generation again, home and design fixes

This commit is contained in:
Thomas Demirdjian
2025-11-14 13:51:53 +01:00
parent 5457030d4a
commit cd31d42c0c
14 changed files with 367 additions and 115 deletions
+8 -6
View File
@@ -13,6 +13,7 @@ import { useUser } from "../../providers/UserDataProvider";
import { gutters, Palette } from "../../styles";
import { FONT_FAMILY } from "../../styles/Fonts";
import { ensureAuthenticated } from "../../utils/authRedirect";
import { responsiveHeight } from "react-native-responsive-dimensions";
const formatDuration = (ms) => {
const totalSeconds = Math.max(0, Math.floor((ms || 0) / 1000));
@@ -103,13 +104,13 @@ const GlobalAudioPlayer = () => {
{
likedBy: next ? arrayUnion(currentUID) : arrayRemove(currentUID),
},
{ merge: true }
{ merge: true },
);
} catch (_error) {
setPendingLike(null);
}
},
[currentUID, effectiveIsLiked, isLikeProcessing, projectId]
[currentUID, effectiveIsLiked, isLikeProcessing, projectId],
);
const insets = useSafeAreaInsets();
@@ -138,7 +139,7 @@ const GlobalAudioPlayer = () => {
await resume();
}
},
[isPlaying, pause, resume]
[isPlaying, pause, resume],
);
const handleOpenDetails = useCallback(() => {
@@ -169,7 +170,9 @@ const GlobalAudioPlayer = () => {
});
}, [currentTrack, navigateToMusicDetails, projectId]);
const TAB_BAR_HEIGHT = 64;
const TAB_BAR_HEIGHT = isWeb
? 64
: (insets.bottom < 20 ? 30 : insets.bottom) + 60;
const GAP_WITH_TAB = 8;
const bottomOffset = (isWeb ? gutters : 5) + TAB_BAR_HEIGHT + GAP_WITH_TAB;
@@ -216,8 +219,7 @@ const GlobalAudioPlayer = () => {
style={[
styles.actionButton,
styles.likeButton,
(!projectId || isLikeProcessing) &&
styles.disabledAction,
(!projectId || isLikeProcessing) && styles.disabledAction,
]}
>
<Image