feat(chat): confirm before logging out

This commit is contained in:
ayn2op 2026-10-12 13:05:29 -04:00
parent 71f2928ecd
commit d9e9339bf6

View file

@ -297,7 +297,11 @@ func (m Model) Update(msg tview.Msg) (Model, tview.Cmd) {
return m, m.updatePane(paneGuildsTree, msg) return m, m.updatePane(paneGuildsTree, msg)
case keybind.Matches(msg, m.cfg.Keybinds.Logout.Keybind): case keybind.Matches(msg, m.cfg.Keybinds.Logout.Keybind):
return m, tview.Sequence(closeState(m.state), logout()) return m, ui.ShowDialog(
"Are you sure you want to log out?",
ui.DialogButton{Label: "No"},
ui.DialogButton{Label: "Yes", Cmd: tview.Sequence(closeState(m.state), logout())},
)
} }
case composer.TabSuggestMsg, mentionslist.Msg: case composer.TabSuggestMsg, mentionslist.Msg:
return m, m.updatePane(paneComposer, msg) return m, m.updatePane(paneComposer, msg)