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:
		
							parent
							
								
									4cd06e34fb
								
							
						
					
					
						commit
						594ea40c4e
					
				
					 1 changed files with 1 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -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{}, &.{} };
 | 
			
		||||
        const tab_style, const tab_style_bufs = root.read_config(Style, allocator);
 | 
			
		||||
        return .{
 | 
			
		||||
            .allocator = allocator,
 | 
			
		||||
            .plane = w.plane,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue