╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1085 │ │1086 pub fn inputWithExit(self: *This, allocator: std.mem.Allocator, raw_key: Key, root_focus: *Focus) !Exit {│ │1087 self.exit = .none; │ │1088 - const key: Key = if (raw_key == .mouse and raw_key.mouse.action == .scroll) │ │1089 - (if (raw_key.mouse.action.scroll == .up) .arrow_up else .arrow_down) │ │1090 - else │ │1091 - raw_key; │ │1088 + const key: Key = switch (raw_key) { │ │1089 + .scroll_up => .arrow_up, │ │1090 + .scroll_down => .arrow_down, │ │1091 + else => raw_key, │ │1092 + }; │ │1093 │ │1094 // a focused assignee input keeps its editing keys │ │1095 if (key == .home or key == .end) if (self.focusedAssigneeInput(root_focus)) |text_input| { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2077 try box.children.put(allocator, frame.getFocus().id, .{ .widget = .{ .box = frame }, .rect = null, .min_size = .{ .width = detail_min_width, .height = null } });│ │2078 } │ │2079 │ │2079 - box.getFocus().child_id = box.children.keys()[if (win.items.len > 0) detail_index else list_index]; │ │2080 + // the page opens on the list, unless the url names a thread │ │2081 + box.getFocus().child_id = box.children.keys()[if (data.selected_id.len > 0) detail_index else list_index]; │ │2082 return box; │ │2083 } │ │2084 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2641 │ │2642 pub fn input(self: *This, allocator: std.mem.Allocator, raw_key: Key, root_focus: *Focus) !void {│ │2643 // wheel input moves focus like the arrows │ │2642 - const key: Key = if (raw_key == .mouse and raw_key.mouse.action == .scroll) │ │2643 - (if (raw_key.mouse.action.scroll == .up) .arrow_up else .arrow_down) │ │2644 - else │ │2645 - raw_key; │ │2644 + const key: Key = switch (raw_key) { │ │2645 + .scroll_up => .arrow_up, │ │2646 + .scroll_down => .arrow_down, │ │2647 + else => raw_key, │ │2648 + }; │ │2649 │ │2650 if (self.headerActive()) { │ │2651 // down from the sub-header re-enters the stack if the selected │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯