╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2169 - .enter => try self.submitRemove(allocator), │ │2170 - .mouse => |mouse| if (inp.leftClickOn(root_focus, button_id, mouse)) try self.submitRemove(allocator), │ │2175 + .enter => try self.submitConfirmation(allocator), │ │2176 + .mouse => |mouse| if (inp.leftClickOn(root_focus, button_id, mouse)) try self.submitConfirmation(allocator),│ │2177 else => {}, │ │2178 } │ │2179 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2504 try self.session.navigate(route); │ │2505 } │ │2506 │ │2507 + fn submitConfirmation(self: *This, allocator: std.mem.Allocator) !void { │ │2508 + switch (confirmation(self.data.view) orelse return) { │ │2509 + .publish => if (comptime supports_drafts) { │ │2510 + if (comptime wasm) return; │ │2511 + const entry = self.data.selectedThread() orelse return; │ │2512 + if (!entryDraft(entry.*)) return; │ │2513 + try self.data.publishDraft(self.session, allocator, entry.id); │ │2514 + const route = listRoute(self.data.identity, @enumFromInt(0), "", entry.id) orelse return;│ │2515 + try self.session.navigate(route); │ │2516 + } else unreachable, │ │2517 + .remove => try self.submitRemove(allocator), │ │2518 + } │ │2519 + } │ │2520 + │ │2521 fn submitRemove(self: *This, allocator: std.mem.Allocator) !void { │ │2522 const comment = self.data.comment_id.len != 0; │ │2523 const event_id = if (comment) self.data.comment_id else self.data.selected_id; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯