╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │449 pub fn repoThreadRoute(kind: evt.EventKind, identity: []const u8, tag: []const u8, selected: []const u8) ?RoutablePage {│ │450 return switch (kind) { │ │451 .issue => repoIssuesRoute(identity, .open, tag, selected), │ │452 + .patch => repoPatchesRoute(identity, .open, tag, selected), │ │453 .discuss => repoDiscussionsRoute(identity, tag, selected), │ │454 else => null, │ │455 }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │460 var route = repoThreadRoute(kind, identity, "", selected) orelse return null;│ │461 switch (route) { │ │462 .repo_issues => |*thread| thread.comments_start = start, │ │463 + .repo_patches => |*thread| thread.comments_start = start, │ │464 .repo_discussions => |*thread| thread.comments_start = start, │ │465 else => unreachable, │ │466 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │474 const comment = Array(evt.event_id_size * 2).from(comment_id) orelse return null;│ │475 switch (route) { │ │476 .repo_issues => |*thread| thread.comment = comment, │ │477 + .repo_patches => |*thread| thread.comment = comment, │ │478 .repo_discussions => |*thread| thread.comment = comment, │ │479 else => unreachable, │ │480 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │488 const parent_event_id = Array(evt.event_id_size * 2).from(parent_id) orelse return null;│ │489 switch (route) { │ │490 .repo_issues => |*thread| { │ │491 + thread.comment = parent_event_id; │ │492 + thread.view = .new_comment; │ │493 + }, │ │494 + .repo_patches => |*thread| { │ │495 thread.comment = parent_event_id; │ │496 thread.view = .new_comment; │ │497 }, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │509 var route = repoThreadCommentRoute(kind, identity, thread_id, comment_id, 0) orelse return null;│ │510 switch (route) { │ │511 .repo_issues => |*thread| thread.view = .edit_comment, │ │512 + .repo_patches => |*thread| thread.view = .edit_comment, │ │513 .repo_discussions => |*thread| thread.view = .edit_comment, │ │514 else => unreachable, │ │515 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │524 repoThreadCommentRoute(kind, identity, thread_id, comment_id, 0) orelse return null;│ │525 switch (route) { │ │526 .repo_issues => |*thread| thread.view = .remove, │ │527 + .repo_patches => |*thread| thread.view = .remove, │ │528 .repo_discussions => |*thread| thread.view = .remove, │ │529 else => unreachable, │ │530 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │536 var route = repoThreadRoute(kind, identity, tag, "") orelse return null;│ │537 switch (route) { │ │538 .repo_issues => |*thread| thread.view = .tags, │ │539 + .repo_patches => |*thread| thread.view = .tags, │ │540 .repo_discussions => |*thread| thread.view = .tags, │ │541 else => unreachable, │ │542 } │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │548 var route = repoThreadRoute(kind, identity, "", "") orelse return null;│ │549 switch (route) { │ │550 .repo_issues => |*thread| thread.view = .new, │ │551 + .repo_patches => |*thread| thread.view = .new, │ │552 .repo_discussions => |*thread| thread.view = .new, │ │553 else => unreachable, │ │554 } │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │561 var route = repoThreadRoute(kind, identity, "", selected) orelse return null;│ │562 switch (route) { │ │563 .repo_issues => |*thread| thread.view = .edit, │ │564 + .repo_patches => |*thread| thread.view = .edit, │ │565 .repo_discussions => |*thread| thread.view = .edit, │ │566 else => unreachable, │ │567 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │574 var route = repoThreadRoute(kind, identity, "", selected) orelse return null;│ │575 switch (route) { │ │576 .repo_issues => |*thread| thread.view = .description, │ │577 + .repo_patches => |*thread| thread.view = .description, │ │578 .repo_discussions => |*thread| thread.view = .description, │ │579 else => unreachable, │ │580 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯