Skip to content

Commit 82d97fd

Browse files
committed
Improve code quality
1 parent 8463304 commit 82d97fd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void UpdateSettings(IReadOnlyDictionary<string, object> settings)
113113
// If can parse the default value to bool, use it, otherwise use false
114114
: value is string stringValue && bool.TryParse(stringValue, out var boolValueFromString)
115115
&& boolValueFromString;
116-
checkBox.Dispatcher.Invoke(() =>checkBox.IsChecked = isChecked);
116+
checkBox.Dispatcher.Invoke(() => checkBox.IsChecked = isChecked);
117117
break;
118118
}
119119
}
@@ -154,8 +154,7 @@ public bool NeedCreateSettingPanel()
154154

155155
public Control CreateSettingPanel()
156156
{
157-
// No need to check if NeedCreateSettingPanel is true because CreateSettingPanel will only be called if it's true
158-
// if (!NeedCreateSettingPanel()) return null;
157+
if (!NeedCreateSettingPanel()) return null;
159158

160159
// Create main grid with two columns (Column 1: Auto, Column 2: *)
161160
var mainPanel = new Grid { Margin = SettingPanelMargin, VerticalAlignment = VerticalAlignment.Center };

0 commit comments

Comments
 (0)