fix: incoming call auto-dismiss, deleted message text, PiP drag cleanup
This commit is contained in:
@@ -128,6 +128,13 @@ function IncomingCall({ dm, info, onIgnore, onAnswer, onReject }: IncomingCallPr
|
|||||||
}
|
}
|
||||||
}, [playSound, info.notificationType]);
|
}, [playSound, info.notificationType]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const remaining = info.senderTs + info.lifetime - Date.now();
|
||||||
|
if (remaining <= 0) { onIgnore(); return; }
|
||||||
|
const id = setTimeout(onIgnore, remaining);
|
||||||
|
return () => clearTimeout(id);
|
||||||
|
}, [info.senderTs, info.lifetime, onIgnore]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Overlay open backdrop={<OverlayBackdrop />}>
|
<Overlay open backdrop={<OverlayBackdrop />}>
|
||||||
|
|||||||
@@ -8,11 +8,7 @@ export const MessageDeletedContent = as<'div', { children?: never; reason?: stri
|
|||||||
({ reason, ...props }, ref) => (
|
({ reason, ...props }, ref) => (
|
||||||
<Box as="span" alignItems="Center" gap="100" style={warningStyle} {...props} ref={ref}>
|
<Box as="span" alignItems="Center" gap="100" style={warningStyle} {...props} ref={ref}>
|
||||||
<Icon size="50" src={Icons.Delete} />
|
<Icon size="50" src={Icons.Delete} />
|
||||||
{reason ? (
|
<i>{reason ? `This message has been deleted — ${reason}` : 'This message has been deleted'}</i>
|
||||||
<i>{reason}</i>
|
|
||||||
) : (
|
|
||||||
<i>This message has been deleted</i>
|
|
||||||
)}
|
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user