fix(session): fix unshare command not clearing share state (#5523)

This commit is contained in:
Ravi Kumar
2025-12-15 09:35:06 +05:30
committed by GitHub
parent 6a09861806
commit 54569b5552
4 changed files with 15 additions and 22 deletions

View File

@@ -323,10 +323,13 @@ export function Session() {
keybind: "session_unshare",
disabled: !session()?.share?.url,
category: "Session",
onSelect: (dialog) => {
sdk.client.session.unshare({
sessionID: route.sessionID,
})
onSelect: async (dialog) => {
await sdk.client.session
.unshare({
sessionID: route.sessionID,
})
.then(() => toast.show({ message: "Session unshared successfully", variant: "success" }))
.catch(() => toast.show({ message: "Failed to unshare session", variant: "error" }))
dialog.clear()
},
},