From 2835ec170db461ef8128445da00c2580895c6130 Mon Sep 17 00:00:00 2001 From: Jonathan Staab Date: Mon, 24 Apr 2023 12:04:33 -0500 Subject: [PATCH] Stack modals forever --- src/app/shared/Note.svelte | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/app/shared/Note.svelte b/src/app/shared/Note.svelte index 06f9da96..16a95bde 100644 --- a/src/app/shared/Note.svelte +++ b/src/app/shared/Note.svelte @@ -54,15 +54,7 @@ return showContext ? true : !r.isContext }) - // If we're already in a note detail modal, don't infinitely nest. But if we're in - // some other modal, make it possible to go back. - const goToNote = data => { - if (modal.getCurrent()?.type === "note/detail") { - modal.replace({type: "note/detail", ...data}) - } else { - modal.push({type: "note/detail", ...data}) - } - } + const goToNote = data => modal.push({type: "note/detail", ...data}) const onClick = e => { const target = e.target as HTMLElement