╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────╮ │src/ui/input.zig│ ╰────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │35 │ │36 /// whether `mouse` is a left press inside the rect of `focus_id`'s focus entry│ │37 pub fn leftClickOn(root_focus: *Focus, focus_id: usize, mouse: Mouse) bool { │ │44 - if (mouse.action != .press or mouse.action.press != .left) return false; │ │38 + if (mouse.button != .left) return false; │ │39 const entry = root_focus.children.get(focus_id) orelse return false; │ │40 const r = entry.rect; │ │41 return mouse.x >= r.x and mouse.y >= r.y and │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────╮ │src/ui/widget.zig│ ╰─────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │528 // scroll wheel moves the focused cell by a full row so the│ │529 // viewport (via scrollToRect) follows in row-sized steps, │ │530 // matching how a scroll wheel feels in a grid view. │ │531 - .mouse => |mouse| switch (mouse.action) { │ │532 - .scroll => |dir| switch (dir) { │ │533 - .up => index -|= cols, │ │534 - .down => if (index + cols < count) { │ │535 - index += cols; │ │536 - }, │ │537 - }, │ │538 - else => {}, │ │531 + .scroll_up => index -|= cols, │ │532 + .scroll_down => if (index + cols < count) { │ │533 + index += cols; │ │534 }, │ │535 else => {}, │ │536 } │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │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 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯