╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2542 defer allocator.free(tags); │ │2543 const description = try description_input.text(allocator); │ │2544 defer allocator.free(description); │ │2545 + const target_branch = if (comptime supports_drafts) try form.children.values()[target_branch_field_index].widget.text_input.text(allocator) else "";│ │2546 + defer if (comptime supports_drafts) allocator.free(target_branch); │ │2547 │ │2548 if (!Event.fieldsValid(title, tags)) return; │ │2549 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2550 if (comptime supports_drafts) { │ │2551 if (entryDraft(entry.*)) { │ │2528 - try self.data.editDraft(self.session, allocator, entry.id, title, tags, description); │ │2552 + self.data.editDraft(self.session, allocator, entry.id, title, tags, description, target_branch) catch return;│ │2553 const route = listRoute(self.data.identity, entryStatus(entry.*), "", entry.id) orelse return; │ │2554 try self.session.navigate(route); │ │2555 return; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2565 var any_repo = try rp.AnyRepo(repo_kind, .{}).open(io, allocator, src.localInitOpts()); │ │2566 defer any_repo.deinit(io, allocator); │ │2567 switch (any_repo) { │ │2544 - inline else => |*repo| if (has_status) │ │2568 + inline else => |*repo| if (supports_drafts) { │ │2569 + try Event.update(repo_kind, repo.self_repo_opts, io, allocator, repo, &id_bytes, .{ .fields = .{│ │2570 + .title = title, │ │2571 + .tags = tags, │ │2572 + .description = description, │ │2573 + .target_branch = target_branch, │ │2574 + } }, author); │ │2575 + } else if (has_status) │ │2576 try Event.update(repo_kind, repo.self_repo_opts, io, allocator, repo, &id_bytes, .{ .fields = .{│ │2577 .title = title, │ │2578 .tags = tags, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯