Skip to content

Commit

Permalink
fix: temp fix for dock if Instagram
Browse files Browse the repository at this point in the history
  • Loading branch information
blackxored committed May 14, 2024
1 parent d51d4f9 commit 0965092
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
40 changes: 26 additions & 14 deletions app/components-react/root/LiveDock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,31 @@ function LiveDock(p: { onLeft: boolean }) {
});
}

const showTiktokInfo =
visibleChat === 'tiktok' || Services.UserService.state.auth!.primaryPlatform === 'tiktok';
const chat = useMemo(() => {
const primaryChat = Services.UserService.state.auth!.primaryPlatform;
const showTiktokInfo = visibleChat === 'tiktok' || primaryChat === 'tiktok';

if (showTiktokInfo && !isRestreaming) {
return <TikTokChatInfo />;
}

debugger;

const showInstagramInfo = primaryChat === 'instagram';
if (showInstagramInfo) {
// FIXME: empty tab
return <></>;
}

return (
<Chat
restream={isRestreaming && visibleChat === 'restream'}
key={visibleChat}
visibleChat={visibleChat}
setChat={setChat}
/>
);
}, [Services.UserService.state.auth!.primaryPlatform, visibleChat]);

return (
<div
Expand Down Expand Up @@ -433,18 +456,7 @@ function LiveDock(p: { onLeft: boolean }) {
)}
</div>
)}
{!applicationLoading &&
!collapsed &&
(showTiktokInfo && !isRestreaming ? (
<TikTokChatInfo />
) : (
<Chat
restream={isRestreaming && visibleChat === 'restream'}
key={visibleChat}
visibleChat={visibleChat}
setChat={setChat}
/>
))}
{!applicationLoading && !collapsed && chat}
{!['default', 'restream'].includes(visibleChat) && (
<PlatformAppPageView
className={styles.liveDockPlatformAppWebview}
Expand Down
2 changes: 1 addition & 1 deletion app/services/platforms/instagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class InstagramService
}

get liveDockEnabled(): boolean {
return false;
return this.streamingService.views.isMultiplatformMode;
}

// Reset stream key since Instagram decided they change for each stream
Expand Down

0 comments on commit 0965092

Please sign in to comment.