╭ changed ──────────────╮ │src/ui/Home/AuthTab.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │21 │ │22 pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session) !View { │ │23 var text_box = try wgt.TextBox(ui.Widget).init(allocator, "login", .{ .border_style = .single, .wrap_kind = .none });│ │24 - errdefer text_box.deinit(); │ │24 + errdefer text_box.deinit(allocator); │ │25 text_box.getFocus().focusable = true; │ │26 return .{ │ │27 .text_box = text_box, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │30 }; │ │31 } │ │32 │ │33 - pub fn deinit(self: *View) void { │ │34 - self.text_box.deinit(); │ │33 + pub fn deinit(self: *View, allocator: std.mem.Allocator) void { │ │34 + self.text_box.deinit(allocator); │ │35 } │ │36 │ │37 - pub fn build(self: *View, constraint: layout.Constraint, root_focus: *Focus) !void { │ │37 + pub fn build(self: *View, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void {│ │38 // update the displayed label based on session state. the inner Text │ │39 // widget's content is just a slice, so we can repoint it without │ │40 // re-allocating. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │42 const text_widget = &self.text_box.box.children.values()[0].widget.text; │ │43 text_widget.content = if (self.session.user_id != null) "logout" else "login"; │ │44 } │ │45 - try self.text_box.build(constraint, root_focus); │ │45 + try self.text_box.build(allocator, constraint, root_focus); │ │46 } │ │47 │ │48 - pub fn input(self: *View, key: inp.Key, root_focus: *Focus) !void { │ │49 - try self.text_box.input(key, root_focus); │ │48 + pub fn input(self: *View, allocator: std.mem.Allocator, key: inp.Key, root_focus: *Focus) !void {│ │49 + try self.text_box.input(allocator, key, root_focus); │ │50 } │ │51 │ │52 pub fn clearGrid(self: *View) void { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯