╭ changed ───────────╮ │src/ui/Home/Auth.zig│ ╰────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │34 │ │35 pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session, users_tab_id: usize) !View {│ │36 var login_view = try Login.View.init(allocator, &data.login, session, users_tab_id); │ │37 - errdefer login_view.deinit(); │ │37 + errdefer login_view.deinit(allocator); │ │38 var logout_view = try Logout.View.init(allocator, &data.logout, session, users_tab_id); │ │39 - errdefer logout_view.deinit(); │ │39 + errdefer logout_view.deinit(allocator); │ │40 return .{ │ │41 .focus = Focus.init(allocator, .container), │ │42 .login = login_view, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │45 }; │ │46 } │ │47 │ │48 - pub fn deinit(self: *View) void { │ │48 + pub fn deinit(self: *View, allocator: std.mem.Allocator) void { │ │49 self.focus.deinit(); │ │50 - self.login.deinit(); │ │51 - self.logout.deinit(); │ │50 + self.login.deinit(allocator); │ │51 + self.logout.deinit(allocator); │ │52 } │ │53 │ │54 - pub fn build(self: *View, constraint: layout.Constraint, root_focus: *Focus) !void { │ │54 + pub fn build(self: *View, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void {│ │55 self.focus.clear(); │ │56 if (self.session.user_id != null) { │ │57 - try self.logout.build(constraint, root_focus); │ │57 + try self.logout.build(allocator, constraint, root_focus); │ │58 if (self.logout.getGrid()) |inner_grid| { │ │59 try self.focus.addChild(self.logout.getFocus(), inner_grid.size, 0, 0); │ │60 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │61 self.focus.child_id = self.logout.getFocus().id; │ │62 } else { │ │63 - try self.login.build(constraint, root_focus); │ │63 + try self.login.build(allocator, constraint, root_focus); │ │64 if (self.login.getGrid()) |inner_grid| { │ │65 try self.focus.addChild(self.login.getFocus(), inner_grid.size, 0, 0);│ │66 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │68 } │ │69 } │ │70 │ │71 - pub fn input(self: *View, key: inp.Key, root_focus: *Focus) !void { │ │71 + pub fn input(self: *View, allocator: std.mem.Allocator, key: inp.Key, root_focus: *Focus) !void {│ │72 if (self.session.user_id != null) { │ │73 - try self.logout.input(key, root_focus); │ │73 + try self.logout.input(allocator, key, root_focus); │ │74 } else { │ │75 - try self.login.input(key, root_focus); │ │75 + try self.login.input(allocator, key, root_focus); │ │76 } │ │77 } │ │78 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯