From 7db73d15206ebc1d8f675fdc194d7470db3a01bf Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 26 Nov 2024 00:06:33 +0800 Subject: [PATCH] chore: merge player icon with logo button --- .../feed-column/float-bar.mobile.tsx | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/apps/renderer/src/modules/app-layout/feed-column/float-bar.mobile.tsx b/apps/renderer/src/modules/app-layout/feed-column/float-bar.mobile.tsx index f879a9f71..850afb25d 100644 --- a/apps/renderer/src/modules/app-layout/feed-column/float-bar.mobile.tsx +++ b/apps/renderer/src/modules/app-layout/feed-column/float-bar.mobile.tsx @@ -83,13 +83,10 @@ export const MobileFloatBar = ({ animate={animateController} >
- - - + -
@@ -132,23 +129,25 @@ const ViewTabs = ({ onViewChange }: { onViewChange?: (view: number) => void }) = ) } -const PlayerIcon = () => { +const PlayerIcon = ({ onLogoClick }: { onLogoClick?: () => void }) => { const { isPlaying, entryId } = useAudioPlayerAtomSelector( useCallback((state) => ({ isPlaying: state.status === "playing", entryId: state.entryId }), []), ) const feedId = useEntry(entryId, (s) => s.feedId) const feed = useFeedById(feedId, feedIconSelector) const [isShowPlayer, setIsShowPlayer] = useState(false) - if (!feed) return null - if (!isPlaying) return null + if (!feed || !isPlaying) { + return ( + + + + ) + } + return ( <> - {isShowPlayer && (