feat(tabs): don't update tab styles config on startup

It is updated when calling open_tabs_style_config, so there is no
need to update it on every start.
This commit is contained in:
CJ van den Berg 2025-01-30 14:07:52 +01:00
parent 4cd06e34fb
commit 594ea40c4e
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -80,11 +80,7 @@ const TabBar = struct {
fn init(allocator: std.mem.Allocator, parent: Plane, event_handler: ?EventHandler) !Self {
var w = try WidgetList.createH(allocator, parent, "tabs", .dynamic);
w.ctx = w;
const tab_style, const tab_style_bufs: [][]const u8 = if (root.exists_config(Style)) blk: {
const tab_style, const tab_style_bufs = root.read_config(Style, allocator);
root.write_config(tab_style, allocator) catch {};
break :blk .{ tab_style, tab_style_bufs };
} else .{ Style{}, &.{} };
return .{
.allocator = allocator,
.plane = w.plane,