╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────╮ │ 8 const diff3 = @import("../../diff3.zig"); │ │ 9 const Comment = @import("Comment.zig"); │ │10 const Attachment = @import("Attachment.zig"); │ │11 -const Threads = @import("Threads.zig"); │ │11 +const thread = ui.widget.thread; │ │12 │ │13 const wasm = builtin.target.cpu.arch == .wasm32;│ │14 │ ╰────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │235 const tag_to_issues_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, evt.Issue.tag_status_to_id_set_key)) orelse return error.NotFound;│ │236 const tag_to_issues = try DB.SortedMap(.read_only).init(tag_to_issues_cursor); │ │237 const decoded = std.Uri.percentDecodeInPlace(try aa.dupe(u8, empty.tag)); │ │238 - open_set = try Threads.tagStatusSet(Self, DB, tag_to_issues, decoded, .open); │ │239 - closed_set = try Threads.tagStatusSet(Self, DB, tag_to_issues, decoded, .closed); │ │238 + open_set = try thread.tagStatusSet(Self, DB, tag_to_issues, decoded, .open); │ │239 + closed_set = try thread.tagStatusSet(Self, DB, tag_to_issues, decoded, .closed); │ │240 // a tag no issue carries is a bad url │ │241 if (open_set == null and closed_set == null) return error.NotFound; │ │242 } else if (try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, evt.Issue.status_to_id_set_key))) |status_to_issues_cursor| { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │243 const status_to_issues = try DB.SortedMap(.read_only).init(status_to_issues_cursor); │ │244 - open_set = try Threads.statusSet(Self, DB, status_to_issues, .open); │ │245 - closed_set = try Threads.statusSet(Self, DB, status_to_issues, .closed); │ │244 + open_set = try thread.statusSet(Self, DB, status_to_issues, .open); │ │245 + closed_set = try thread.statusSet(Self, DB, status_to_issues, .closed); │ │246 } else if (rooted) return error.NotFound; │ │247 │ │248 const event_id_to_issue_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, evt.Issue.record_map_key)) orelse {│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │307 if (conflicts_map) |map| { │ │308 if (try map.getCursor(order_key)) |conflict_cursor| { │ │309 const conflict_entry = try DB.HashMap(.read_only).init(conflict_cursor); │ │310 - conflict_data = try Threads.readConflict(Self, repo_kind, repo_opts, arena, repo, io, admin_moment, haxy_moment, &id_bytes, issue_event, conflict_entry);│ │310 + conflict_data = try thread.readConflict(Self, repo_kind, repo_opts, arena, repo, io, admin_moment, haxy_moment, &id_bytes, issue_event, conflict_entry); │ │311 resolved_view = .resolve; │ │312 } │ │313 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │317 } │ │318 │ │319 const thread_comments_start = if (empty.comment_id.len == 0) comments_start else 0; │ │320 - const open_window = try Threads.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_issue, open_set, open_root, conflict_set, empty.selected_id, thread_comments_start); │ │321 - const closed_window = try Threads.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_issue, closed_set, closed_root, conflict_set, empty.selected_id, thread_comments_start); │ │322 - const conflicts_window = try Threads.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_issue, conflict_set, conflicts_root, conflict_set, empty.selected_id, thread_comments_start);│ │320 + const open_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_issue, open_set, open_root, conflict_set, empty.selected_id, thread_comments_start); │ │321 + const closed_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_issue, closed_set, closed_root, conflict_set, empty.selected_id, thread_comments_start); │ │322 + const conflicts_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_issue, conflict_set, conflicts_root, conflict_set, empty.selected_id, thread_comments_start); │ │323 if (view == .conflicts and conflicts_window.count > 0) resolved_view = .conflicts; │ │324 │ │325 const comment_page = if (empty.comment_id.len == 0) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │327 else │ │328 try Comment.init(repo_opts.hash, arena, admin_moment, haxy_moment, empty.selected_id, empty.comment_id, comments_start);│ │329 │ │330 - const tags = try Threads.loadTags(Self, repo_opts.hash, arena, haxy_moment); │ │330 + const tags = try thread.loadTags(Self, repo_opts.hash, arena, haxy_moment); │ │331 │ │332 return .{ │ │333 .identity = empty.identity, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮ │347 }; │ │348 } │ │349 │ │350 -pub const View = Threads.View(.issue, Self); │ │350 +pub const View = thread.View(.issue, Self); │ │351 │ │352 -pub const Header = Threads.Header; │ │352 +pub const Header = thread.Header; │ │353 │ │354 // tabs switching between the issues page's views │ │355 pub fn initHeader(allocator: std.mem.Allocator, session: *ui.Session, data: *const Self) !Header {│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯