Reset message bar when ! is passed with :cancel (#231)
This commit is contained in:
@@ -185,13 +185,15 @@ impl ChatState {
|
|||||||
|
|
||||||
match act {
|
match act {
|
||||||
MessageAction::Cancel(skip_confirm) => {
|
MessageAction::Cancel(skip_confirm) => {
|
||||||
self.reply_to = None;
|
|
||||||
self.editing = None;
|
|
||||||
|
|
||||||
if skip_confirm {
|
if skip_confirm {
|
||||||
|
self.reset();
|
||||||
|
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.reply_to = None;
|
||||||
|
self.editing = None;
|
||||||
|
|
||||||
let msg = "Would you like to clear the message bar?";
|
let msg = "Would you like to clear the message bar?";
|
||||||
let act = PromptAction::Abort(false);
|
let act = PromptAction::Abort(false);
|
||||||
let prompt = PromptYesNo::new(msg, vec![Action::from(act)]);
|
let prompt = PromptYesNo::new(msg, vec![Action::from(act)]);
|
||||||
|
|||||||
Reference in New Issue
Block a user