Fix the rageshake modal on mobile

As per comment

Unsure if this is the best fix - ideally we wouldn't go into no-controls
mode at all, but this part doesn't know whether the dialog is open so
the only thing we could really do is tweak the threshold, or possibly
guess based on width instead?
This commit is contained in:
David Baker 2023-01-23 17:52:02 +00:00
parent 41b72440a0
commit d2631a3e02

View file

@ -210,8 +210,9 @@ export const PTTCallView: React.FC<Props> = ({
</Header> </Header>
)} )}
<div className={styles.center}> <div className={styles.center}>
{showControls && ( {/* Always render this because the window will become shorter when the on-screen
<> keyboard appears, so if we don't render it, the dialog will unmount. */}
<div style={{ display: showControls ? "block" : "none" }}>
<div className={styles.participants}> <div className={styles.participants}>
<p> <p>
{t("{{count}} people connected", { {t("{{count}} people connected", {
@ -238,8 +239,7 @@ export const PTTCallView: React.FC<Props> = ({
{!isEmbedded && <HangupButton onPress={onLeave} />} {!isEmbedded && <HangupButton onPress={onLeave} />}
<InviteButton onPress={() => inviteModalState.open()} /> <InviteButton onPress={() => inviteModalState.open()} />
</div> </div>
</> </div>
)}
<div className={styles.pttButtonContainer}> <div className={styles.pttButtonContainer}>
{showControls && {showControls &&