Skip to content

Commit 4193fc8

Browse files
committed
refactor
1 parent f85553a commit 4193fc8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/SharpIDE.Godot/Features/BottomPanel/BottomPanelManager.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,8 @@ private async Task OnBottomPanelTabSelected(BottomPanelType? type)
6161
{
6262
await this.InvokeAsync(() =>
6363
{
64-
if (type == null)
65-
{
66-
GodotGlobalEvents.Instance.BottomPanelVisibilityChangeRequested.InvokeParallelFireAndForget(false);
67-
}
68-
else
69-
{
70-
GodotGlobalEvents.Instance.BottomPanelVisibilityChangeRequested.InvokeParallelFireAndForget(true);
71-
}
64+
var visible = type is not null;
65+
GodotGlobalEvents.Instance.BottomPanelVisibilityChangeRequested.InvokeParallelFireAndForget(visible);
7266
foreach (var kvp in _panelTypeMap)
7367
{
7468
kvp.Value.Visible = kvp.Key == type;

0 commit comments

Comments
 (0)