feat(chat): confirm before logging out
This commit is contained in:
parent
71f2928ecd
commit
d9e9339bf6
1 changed files with 5 additions and 1 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue