mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 23:30:28 +03:00
Fix DM header since it *can* be a call room
This commit is contained in:
parent
c7ea3f7e57
commit
a4af96b530
1 changed files with 20 additions and 21 deletions
|
|
@ -239,7 +239,7 @@ export function RoomViewHeader() {
|
|||
const mDirectsEvent = mx.getAccountData('m.direct');
|
||||
const { roomId } = room;
|
||||
return (
|
||||
Object.values(mDirectsEvent?.event.content).filter((e) => {
|
||||
Object.values(mDirectsEvent?.event?.content).filter((e) => {
|
||||
if (e.indexOf(roomId) === 0) return true;
|
||||
}).length !== 0
|
||||
);
|
||||
|
|
@ -341,7 +341,25 @@ export function RoomViewHeader() {
|
|||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
{room.isCallRoom && (
|
||||
{(room.isCallRoom() && (
|
||||
<Box>
|
||||
<TooltipProvider
|
||||
position="Bottom"
|
||||
offset={4}
|
||||
tooltip={
|
||||
<Tooltip>
|
||||
<Text>Chat</Text>
|
||||
</Tooltip>
|
||||
}
|
||||
>
|
||||
{(triggerRef) => (
|
||||
<IconButton ref={triggerRef} onClick={toggleChat}>
|
||||
<Icon size="400" src={Icons.Message} />
|
||||
</IconButton>
|
||||
)}
|
||||
</TooltipProvider>
|
||||
</Box>
|
||||
)) || (
|
||||
<Box shrink="No">
|
||||
{isDirectMessage() && (
|
||||
<TooltipProvider
|
||||
|
|
@ -490,25 +508,6 @@ export function RoomViewHeader() {
|
|||
/>
|
||||
</Box>
|
||||
)}
|
||||
{room.isCallRoom() && (
|
||||
<Box>
|
||||
<TooltipProvider
|
||||
position="Bottom"
|
||||
offset={4}
|
||||
tooltip={
|
||||
<Tooltip>
|
||||
<Text>Chat</Text>
|
||||
</Tooltip>
|
||||
}
|
||||
>
|
||||
{(triggerRef) => (
|
||||
<IconButton ref={triggerRef} onClick={toggleChat}>
|
||||
<Icon size="400" src={Icons.Message} />
|
||||
</IconButton>
|
||||
)}
|
||||
</TooltipProvider>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
</PageHeader>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue