aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/shell/config.rs')
-rw-r--r--src/client/shell/config.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/client/shell/config.rs b/src/client/shell/config.rs
index e8a9b4bb..36e1051f 100644
--- a/src/client/shell/config.rs
+++ b/src/client/shell/config.rs
@@ -32,6 +32,22 @@ impl ClientShellState {
};
let mut collapsed_groups = self.collapsed_groups.iter().cloned().collect::<Vec<_>>();
collapsed_groups.sort();
+ let mut remote_collapsed_groups = self
+ .remote_collapsed_groups
+ .iter()
+ .filter_map(|(endpoint_id, groups)| {
+ let ClientEndpointId::Ssh(profile_id) = endpoint_id else {
+ return None;
+ };
+ let mut collapsed_groups = groups.iter().cloned().collect::<Vec<_>>();
+ collapsed_groups.sort();
+ (!collapsed_groups.is_empty()).then(|| preferences::ClientRemoteCollapsedGroups {
+ profile_id: profile_id.to_string(),
+ collapsed_groups,
+ })
+ })
+ .collect::<Vec<_>>();
+ remote_collapsed_groups.sort_by(|left, right| left.profile_id.cmp(&right.profile_id));
let preferences = preferences::ClientChromePreferences {
sidebar_width: self.sidebar_width_manual.then_some(self.sidebar_width),
sidebar_section_split: self
@@ -44,6 +60,7 @@ impl ClientShellState {
.agent_panel_sort_manual
.then_some(self.config.agent_panel_sort),
collapsed_groups,
+ remote_collapsed_groups,
};
if let Err(error) = preferences::store(path, preferences) {
self.endpoint_error = Some(error);