Skip to content

Commit a910186

Browse files
committed
Minor refactoring
1 parent ef70ffc commit a910186

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Ice/Settings/SettingsPanes/UpdatesSettingsPane.swift

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ struct UpdatesSettingsPane: View {
3030
automaticallyCheckForUpdates
3131
automaticallyDownloadUpdates
3232
}
33-
Section {
34-
checkForUpdates
33+
if updatesManager.canCheckForUpdates {
34+
Section {
35+
checkForUpdates
36+
}
3537
}
3638
}
3739
.formStyle(.grouped)
@@ -59,13 +61,13 @@ struct UpdatesSettingsPane: View {
5961
@ViewBuilder
6062
private var checkForUpdates: some View {
6163
HStack {
62-
if updatesManager.canCheckForUpdates {
63-
Button("Check for Updates…") {
64-
updatesManager.checkForUpdates()
65-
}
66-
.controlSize(.large)
64+
Button("Check for Updates…") {
65+
updatesManager.checkForUpdates()
6766
}
67+
.controlSize(.large)
68+
6869
Spacer()
70+
6971
HStack(spacing: 2) {
7072
Text("Last checked:")
7173
Text(lastUpdateCheckString)

0 commit comments

Comments
 (0)