Skip to content

Commit

Permalink
fix: AbortRequest did reset tab state
Browse files Browse the repository at this point in the history
  • Loading branch information
phire22 committed Apr 3, 2024
1 parent 575bf56 commit c56eaa7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions wireman/src/events/messages/request.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use crate::{
context::{AppContext, MessagesTab},
model::headers::HeadersTab,
};
use crate::context::{AppContext, MessagesTab};
use std::fmt;
use tui_key_event_handler::{EventHandler, KeyCode, KeyEvent};

Expand Down Expand Up @@ -76,11 +73,7 @@ impl EventHandler for RequestEventHandler {
ctx.messages.borrow_mut().start_request();
}
RequestEvents::AbortRequest => {
if ctx.headers.borrow().tab == HeadersTab::None {
ctx.tab = ctx.tab.next();
} else {
ctx.headers.borrow_mut().tab = HeadersTab::None;
}
ctx.messages.borrow_mut().abort_request();
}
RequestEvents::GoToResponse => {
ctx.messages_tab = MessagesTab::Response;
Expand Down

0 comments on commit c56eaa7

Please sign in to comment.