mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-27 22:50:19 +00:00
bug: fix freezing not affecting processes during search and sort
Fixes a bug where searching refreshed process data even when frozen.
This commit is contained in:
parent
3394b9ee66
commit
1a25fbb987
1 changed files with 21 additions and 17 deletions
|
@ -426,10 +426,12 @@ pub fn update_all_process_lists(app: &mut App) {
|
||||||
.cloned()
|
.cloned()
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
if !app.is_frozen {
|
||||||
widget_ids.into_iter().for_each(|widget_id| {
|
widget_ids.into_iter().for_each(|widget_id| {
|
||||||
update_final_process_list(app, widget_id);
|
update_final_process_list(app, widget_id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn update_final_process_list(app: &mut App, widget_id: u64) {
|
pub fn update_final_process_list(app: &mut App, widget_id: u64) {
|
||||||
let is_invalid_or_blank = match app.proc_state.widget_states.get(&widget_id) {
|
let is_invalid_or_blank = match app.proc_state.widget_states.get(&widget_id) {
|
||||||
|
@ -441,6 +443,7 @@ pub fn update_final_process_list(app: &mut App, widget_id: u64) {
|
||||||
};
|
};
|
||||||
let is_grouped = app.is_grouped(widget_id);
|
let is_grouped = app.is_grouped(widget_id);
|
||||||
|
|
||||||
|
if !app.is_frozen {
|
||||||
if let Some(proc_widget_state) = app.proc_state.get_mut_widget_state(widget_id) {
|
if let Some(proc_widget_state) = app.proc_state.get_mut_widget_state(widget_id) {
|
||||||
app.canvas_data.process_data = convert_process_data(
|
app.canvas_data.process_data = convert_process_data(
|
||||||
&app.data_collection,
|
&app.data_collection,
|
||||||
|
@ -456,6 +459,7 @@ pub fn update_final_process_list(app: &mut App, widget_id: u64) {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let process_filter = app.get_process_filter(widget_id);
|
let process_filter = app.get_process_filter(widget_id);
|
||||||
let filtered_process_data: Vec<ConvertedProcessData> = app
|
let filtered_process_data: Vec<ConvertedProcessData> = app
|
||||||
|
|
Loading…
Reference in a new issue