summaryrefslogtreecommitdiffstats
path: root/src/app.rs
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2023-01-19 05:40:34 -0500
committerGitHub <noreply@github.com>2023-01-19 05:40:34 -0500
commit22e386a38c713c8aa7045e04b7d8c8e7216f7074 (patch)
treea31d31cae91d8ff6dfac95ed7cc61405d6f91c6c /src/app.rs
parent0a83456adb0e1cbdcfee1fa05eb32cf645d6783e (diff)
other: re-enable disk usage split, update help menu (#963)
* Revert "other: revert disk usage change for now (#962)" This reverts commit d3661c23200a66c7dc01f4e534d8d7e97dc188d2. * some cleanup * update help menu * update screenshot * update changelog wording * Remove redundant newlines * Use type system to ensure help constants match in size
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/app.rs b/src/app.rs
index bad8667b..311aceb1 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1159,8 +1159,7 @@ impl App {
.disk_state
.get_mut_widget_state(self.current_widget.widget_id)
{
- disk.table.set_sort_index(0);
- disk.force_data_update();
+ disk.set_index(0);
}
}
'g' => {
@@ -1207,8 +1206,7 @@ impl App {
.disk_state
.get_mut_widget_state(self.current_widget.widget_id)
{
- disk.table.set_sort_index(1);
- disk.force_data_update();
+ disk.set_index(1);
}
}
'p' => {
@@ -1219,6 +1217,11 @@ impl App {
{
proc_widget_state.select_column(ProcWidget::PID_OR_COUNT);
}
+ } else if let Some(disk) = self
+ .disk_state
+ .get_mut_widget_state(self.current_widget.widget_id)
+ {
+ disk.set_index(5);
}
}
'P' => {
@@ -1243,8 +1246,7 @@ impl App {
.disk_state
.get_mut_widget_state(self.current_widget.widget_id)
{
- disk.table.set_sort_index(3);
- disk.force_data_update();
+ disk.set_index(3);
}
}
'?' => {
@@ -1268,8 +1270,7 @@ impl App {
.disk_state
.get_mut_widget_state(self.current_widget.widget_id)
{
- disk.table.set_sort_index(4);
- disk.force_data_update();
+ disk.set_index(4);
}
}
'+' => self.on_plus(),
@@ -1293,8 +1294,7 @@ impl App {
.disk_state
.get_mut_widget_state(self.current_widget.widget_id)
{
- disk.table.set_sort_index(2);
- disk.force_data_update();
+ disk.set_index(2);
}
}
'r' => {
@@ -1302,8 +1302,7 @@ impl App {
.disk_state
.get_mut_widget_state(self.current_widget.widget_id)
{
- disk.table.set_sort_index(5);
- disk.force_data_update();
+ disk.set_index(6);
}
}
'w' => {
@@ -1311,8 +1310,7 @@ impl App {
.disk_state
.get_mut_widget_state(self.current_widget.widget_id)
{
- disk.table.set_sort_index(6);
- disk.force_data_update();
+ disk.set_index(7);
}
}
'I' => self.invert_sort(),