Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-modal-layout-thing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: minor
---

Upgraded the forward modal to use the same modal present for search and added the ability to forward to same room the message is from.
14 changes: 6 additions & 8 deletions src/app/components/message/modals/GlobalModalManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ import { MessageReadReceiptInternal } from './MessageReadRecipts';
export function GlobalModalManager() {
const [modal, setModal] = useAtom(modalAtom);

if (!modal) return null;

const close = () => setModal(null);

if (modal?.type === ModalType.Forward) {
return <MessageForwardInternal room={modal.room} mEvent={modal.mEvent} onClose={close} />;
}

if (!modal) return null;

return (
<Overlay open backdrop={<OverlayBackdrop />}>
<OverlayCenter>
Expand All @@ -42,12 +46,6 @@ export function GlobalModalManager() {
</Box>
)}

{modal.type === ModalType.Forward && (
<Box>
<MessageForwardInternal room={modal.room} mEvent={modal.mEvent} onClose={close} />
</Box>
)}

{modal.type === ModalType.Source && (
<Modal variant="Surface" size="300">
<MessageSourceInternal room={modal.room} mEvent={modal.mEvent} onClose={close} />
Expand Down
Loading
Loading