Reopen the last DM that was open when navigating back to chat (#81)

#60

Co-authored-by: mplorentz <mplorentz@users.noreply.github.com>
Reviewed-on: coracle/flotilla#81
Co-authored-by: Matt Lorentz <mplorentz@noreply.coracle.social>
Co-committed-by: Matt Lorentz <mplorentz@noreply.coracle.social>
This commit is contained in:
2026-02-19 18:31:54 +00:00
committed by hodlbod
parent 5a2b5f43b8
commit ba1757d4f1
3 changed files with 12 additions and 6 deletions
+4
View File
@@ -1,10 +1,14 @@
import {page} from "$app/stores"
export const lastPageBySpaceUrl = new Map<string, string>()
export let lastChatUrl: string | undefined = undefined
export const setupHistory = () =>
page.subscribe($page => {
if ($page.params.relay) {
lastPageBySpaceUrl.set($page.params.relay, $page.url.pathname)
}
if ($page.params.chat) {
lastChatUrl = $page.url.pathname
}
})