Keep workspace presentation in numeric order

This commit is contained in:
Samuel Onoja committed 2026-09-29 21:29:58 +01:00
1 parent b2363a18b0
commit ae712b6b40
7 files changed
+59 -29

No files matched your search

+3 -3
View File
@@ -507,9 +507,10 @@ impl Ferese {
fn workspaces_json(&self) -> Value {
let active = self.workspaces.active_id();
let mut workspaces = self
let workspaces = self
.workspaces
.iter()
.ordered()
.into_iter()
.map(|workspace| {
let mode = match workspace.layout.mode() {
LayoutMode::Scrolling => "scrolling",
@@ -525,7 +526,6 @@ impl Ferese {
})
})
.collect::<Vec<_>>();
workspaces.sort_by_key(|workspace| workspace["id"].as_u64());
Value::Array(workspaces)
}