╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Threads.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────╮ │1486 break :blk tb.getFocus().id; │ │1487 }; │ │1488 │ │1577 - if (has_drafts and entryDraft(entry)) { │ │1489 + if (supports_drafts and entryDraft(entry)) { │ │1490 inner.getFocus().child_id = inner.children.keys()[0];│ │1491 const sc = self.detailScroll(index); │ │1492 sc.x = 0; │ ╰───────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1554 if (self.formViewActive()) { │ │1555 if (self.data.view == .remove) { │ │1556 try self.removeFormInput(allocator, key, root_focus); │ │1645 - } else if (has_conflicts and self.data.view == .resolve) { │ │1557 + } else if (supports_conflicts and self.data.view == .resolve) { │ │1558 try self.resolveInput(allocator, key, root_focus); │ │1559 } else if (self.data.view == .new_comment or self.data.view == .edit_comment) {│ │1560 try self.commentFormInput(allocator, key, root_focus); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │1726 fn primaryAction(self: *This, allocator: std.mem.Allocator, index: usize) !void {│ │1727 const selected = self.detailed_index[index] orelse return; │ │1728 const entry = self.window(index).items[selected]; │ │1817 - if (has_drafts and entryDraft(entry)) │ │1729 + if (supports_drafts and entryDraft(entry)) │ │1730 try self.postDraft(allocator, index) │ │1731 else │ │1732 try self.toggleStatus(allocator, index); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │1733 } │ │1734 │ │1735 fn postDraft(self: *This, allocator: std.mem.Allocator, index: usize) !void {│ │1824 - if (!has_drafts or comptime wasm) return; │ │1736 + if (!supports_drafts or comptime wasm) return; │ │1737 const selected = self.detailed_index[index] orelse return; │ │1738 const entry = self.window(index).items[selected]; │ │1739 if (!entryDraft(entry) or !entry.revision_ready) return; │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2186 defer any_repo.deinit(io, allocator); │ │2187 switch (any_repo) { │ │2188 inline else => |*repo| { │ │2277 - const change: Event.Update = if (comptime kind == .patch) │ │2278 - .{ .resolve = .{ │ │2279 - .title = title, │ │2280 - .tags = tags, │ │2281 - .hunks = hunks.items, │ │2282 - .theirs = self.data.theirs_picks, │ │2283 - } } │ │2284 - else │ │2285 - .{ .resolve = .{ │ │2286 - .title = title, │ │2287 - .tags = tags, │ │2288 - .hunks = hunks.items, │ │2289 - } }; │ │2189 + var resolution: Event.Resolve = .{ │ │2190 + .title = title, │ │2191 + .tags = tags, │ │2192 + .hunks = hunks.items, │ │2193 + }; │ │2194 + if (comptime @hasField(Event.Resolve, "theirs")) resolution.theirs = self.data.theirs_picks; │ │2195 + const change = Event.Update{ .resolve = resolution }; │ │2196 Event.update(repo_kind, repo.self_repo_opts, io, allocator, repo, &id_bytes, change, author) catch |err| switch (err) {│ │2197 // leave the form up for correction │ │2198 error.InvalidFields => return, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2284 │ │2285 if (!Event.fieldsValid(title, tags)) return; │ │2286 │ │2381 - if (comptime kind == .patch) { │ │2287 + if (comptime supports_drafts) { │ │2288 const event_id_hex = try Data.createDraft(self.data, self.session, allocator, title, tags, description);│ │2289 title_input.clear(allocator); │ │2290 tags_input.clear(allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯