Skip to content
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

Fixed progress bar not suspending multiprogress bar #568

Merged
merged 2 commits into from
Jul 31, 2023
Merged

Fixed progress bar not suspending multiprogress bar #568

merged 2 commits into from
Jul 31, 2023

Conversation

Vrajs16
Copy link
Contributor

@Vrajs16 Vrajs16 commented Jul 30, 2023

When suspending a progress bar which is already inside a multiprogress bar, it should suspend the multiprogress bar.

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chris-laplante what do you think? Makes sense to me.

src/state.rs Outdated
let _ = drawable.clear();
}
if let Some((state, _)) = self.draw_target.remote() {
state.write().unwrap().suspend(f, now)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: please return from this if, so that we don't need to have the rest of the function in the else block (reducing rightward drift).

Copy link
Contributor Author

@Vrajs16 Vrajs16 Jul 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright changed it

@djc djc requested a review from chris-laplante July 31, 2023 09:49
Copy link
Collaborator

@chris-laplante chris-laplante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me too, thanks!

@chris-laplante chris-laplante merged commit 0624348 into console-rs:main Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants