Skip to content

Commit

Permalink
fix accidental not and clean up diff
Browse files Browse the repository at this point in the history
  • Loading branch information
genusistimelord committed Mar 1, 2024
1 parent 7111341 commit 5d08bd7
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/native/tabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,20 +312,8 @@ where
}

fn diff(&self, tree: &mut Tree) {
if !tree.children.is_empty() {
let tabs = Tree {
tag: Tag::stateless(),
state: State::None,
children: self.tabs.iter().map(Tree::new).collect(),
};

let bar = Tree {
tag: self.tab_bar.tag(),
state: self.tab_bar.state(),
children: self.tab_bar.children(),
};

tree.children = vec![bar, tabs];
if tree.children.is_empty() {
tree.children = self.children();
}

if let Some(tabs) = tree.children.get_mut(1) {
Expand Down

0 comments on commit 5d08bd7

Please sign in to comment.