Skip to content

Commit b0c14ab

Browse files
committed
fix: tab splitter visible issue
1 parent 4610f70 commit b0c14ab

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Converters/LauncherPageConverters.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,21 @@ public static class LauncherPageConverters
2323
return false;
2424

2525
var selected = array[1] as ViewModels.LauncherPage;
26+
if (selected == null)
27+
return true;
28+
2629
var collections = array[2] as AvaloniaList<ViewModels.LauncherPage>;
30+
if (collections == null)
31+
return true;
32+
33+
if (self == selected)
34+
return false;
35+
36+
var selfIdx = collections.IndexOf(self);
37+
if (selfIdx == collections.Count - 1)
38+
return true;
2739

28-
return selected != null && collections != null && (self == selected || collections.IndexOf(self) + 1 == collections.IndexOf(selected));
40+
return collections[selfIdx + 1] != selected;
2941
});
3042
}
3143
}

0 commit comments

Comments
 (0)