╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────╮ │src/ui/User/Header.zig│ ╰──────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │140 var self = View{ .box = box, .data = data, .tab_ids = tab_ids };│ │141 // open on the tab named by the current route │ │126 - self.getFocus().child_id = tab_ids[ │ │142 + self.getFocus().child_id = self.tab_ids.keys()[ │ │143 switch (session.data.current_page) { │ │144 .user_settings => 1, │ │145 .user_auth => 2, │ ╰─────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │151 │ │152 pub fn deinit(self: *View, allocator: std.mem.Allocator) void { │ │153 self.box.deinit(allocator); │ │154 + self.tab_ids.deinit(allocator); │ │155 } │ │156 │ │157 pub fn build(self: *View, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void {│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────╮ │176 var new_tab = current_tab; │ │177 switch (key) { │ │178 .arrow_left => new_tab -|= 1, │ │162 - .arrow_right => if (new_tab + 1 < self.tab_ids.len) { │ │179 + .arrow_right => if (new_tab + 1 < self.tab_ids.count()) {│ │180 new_tab += 1; │ │181 }, │ │182 else => {}, │ ╰──────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────╮ │183 } │ │184 if (new_tab != current_tab) { │ │168 - try root_focus.setFocus(self.tab_ids[new_tab]); │ │185 + try root_focus.setFocus(self.tab_ids.keys()[new_tab]);│ │186 } │ │187 } │ │188 │ ╰───────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────╮ │204 │ │205 fn currentTabIndex(self: View) ?usize { │ │206 const child_id = self.box.focus.child_id orelse return null;│ │190 - for (self.tab_ids, 0..) |id, i| { │ │191 - if (id == child_id) return i; │ │192 - } │ │193 - return null; │ │207 + return self.tab_ids.getIndex(child_id); │ │208 } │ │209 }; │ │210 │ ╰─────────────────────────────────────────────────────────────────────────╯ ╭ added ────────╮ │src/ui/Quit.zig│ ╰───────────────╯