Commit 79f6b5b75c

79f6b5b75c1cff73c0f5cd77d0b1292359444876

parent: 6600685dd5

Unregistered key

Ulyssa <git@ulyssa.dev> · 2024-03-28 02:35 UTC
committer: <noreply@github.com>

Reset message bar when `!` is passed with :cancel (#231)

Layout: unified · split

src/windows/room/chat.rs +5 −3
@@ -185,13 +185,15 @@ impl ChatState {
185 185
186 match act { 186 match act {
187 MessageAction::Cancel(skip_confirm) => { 187 MessageAction::Cancel(skip_confirm) => {
188 self.reply_to = None;
189 self.editing = None;
190
191 if skip_confirm { 188 if skip_confirm {
189 self.reset();
190
192 return Ok(None); 191 return Ok(None);
193 } 192 }
194 193
194 self.reply_to = None;
195 self.editing = None;
196
195 let msg = "Would you like to clear the message bar?"; 197 let msg = "Would you like to clear the message bar?";
196 let act = PromptAction::Abort(false); 198 let act = PromptAction::Abort(false);
197 let prompt = PromptYesNo::new(msg, vec![Action::from(act)]); 199 let prompt = PromptYesNo::new(msg, vec![Action::from(act)]);