fix(messaging): hide overlay on mobile

This commit is contained in:
Paul Makles 2022-01-15 12:52:31 +00:00
parent 8bda3123da
commit 7e4f4cf001

View file

@ -6,6 +6,7 @@ import { memo } from "preact/compat";
import { useState } from "preact/hooks"; import { useState } from "preact/hooks";
import { internalEmit } from "../../../lib/eventEmitter"; import { internalEmit } from "../../../lib/eventEmitter";
import { isTouchscreenDevice } from "../../../lib/isTouchscreenDevice";
import { QueuedMessage } from "../../../mobx/stores/MessageQueue"; import { QueuedMessage } from "../../../mobx/stores/MessageQueue";
@ -175,12 +176,14 @@ const Message = observer(
{message.embeds?.map((embed, index) => ( {message.embeds?.map((embed, index) => (
<Embed key={index} embed={embed} /> <Embed key={index} embed={embed} />
))} ))}
{mouseHovering && !replacement && ( {mouseHovering &&
<MessageOverlayBar !replacement &&
message={message} !isTouchscreenDevice && (
queued={queued} <MessageOverlayBar
/> message={message}
)} queued={queued}
/>
)}
</MessageContent> </MessageContent>
</MessageBase> </MessageBase>
</div> </div>