Skip to content

Commit

Permalink
Reset message bar when ! is passed with :cancel (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulyssa committed Mar 28, 2024
1 parent 6600685 commit 79f6b5b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/windows/room/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,15 @@ impl ChatState {

match act {
MessageAction::Cancel(skip_confirm) => {
self.reply_to = None;
self.editing = None;

if skip_confirm {
self.reset();

return Ok(None);
}

self.reply_to = None;
self.editing = None;

let msg = "Would you like to clear the message bar?";
let act = PromptAction::Abort(false);
let prompt = PromptYesNo::new(msg, vec![Action::from(act)]);
Expand Down

0 comments on commit 79f6b5b

Please sign in to comment.