Skip to content

Commit c472239

Browse files
committed
Fix unneccessary black lines when settings control is null
1 parent 5fc8ed1 commit c472239

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void Save()
112112
public Control CreateSettingPanel()
113113
{
114114
if (Settings == null || Settings.Count == 0)
115-
return new();
115+
return null;
116116

117117
var settingWindow = new UserControl();
118118
var mainPanel = new Grid { Margin = settingPanelMargin, VerticalAlignment = VerticalAlignment.Center };

Flow.Launcher/ViewModel/PluginViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public bool IsExpanded
9090
private Control _bottomPart2;
9191
public Control BottomPart2 => IsExpanded ? _bottomPart2 ??= new InstalledPluginDisplayBottomData() : null;
9292

93-
public bool HasSettingControl => PluginPair.Plugin is ISettingProvider;
93+
public bool HasSettingControl => PluginPair.Plugin is ISettingProvider settingProvider && settingProvider.CreateSettingPanel() != null;
9494
public Control SettingControl
9595
=> IsExpanded
9696
? _settingControl

0 commit comments

Comments
 (0)