-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close debug panel tabs when client stopped #20
Close debug panel tabs when client stopped #20
Conversation
Instead of unwrapping send client stopped event to close all the panes that belong to that client
854e505
to
e95f9b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is looking good!!
@@ -94,6 +94,9 @@ impl DebugPanelItem { | |||
DebugPanelEvent::Output((client_id, event)) => { | |||
Self::handle_output_event(this, client_id, event, cx) | |||
} | |||
DebugPanelEvent::ClientStopped(client_id) => { | |||
Self::handle_client_stopped_event(this, client_id, cx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be more readable to call the function using this
e.g this.handle_client_stopped_event(client_id, cx)
Not a blocking issue for a PR though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change them, will do in another pr
client_id: &DebugAdapterClientId, | ||
cx: &mut ViewContext<Self>, | ||
) { | ||
if Self::should_skip_event(this, client_id, this.thread_id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as earlier this.should_skip_event(client_id, this.thread_id)
is more readable. Also, I'm not sure it's necessary to pass thread_id to a struct's method when the struct is already aware of that value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method requires it, but i could just check only client is myself. But i think this is more self explaining and its inline with the other event handles. So its more consistent
No description provided.