Skip to content

Commit c7e8814

Browse files
authored
Code Cleanup: Simplify AppDelegate (#1184)
* Code Cleanup: simplify SoftwareUpdater variable, make it private and constant * Code Cleanup: Make some methods in AppDelegate private
1 parent 0891863 commit c7e8814

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CodeEdit/AppDelegate.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Preferences
1010
import CodeEditSymbols
1111

1212
final class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
13-
var updater: SoftwareUpdater = SoftwareUpdater()
13+
private let updater = SoftwareUpdater()
1414

1515
func applicationDidFinishLaunching(_ notification: Notification) {
1616
enableWindowSizeSaveOnQuit()
@@ -141,11 +141,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
141141
preferencesWindowController.show()
142142
}
143143

144-
@IBAction func openWelcome(_ sender: Any) {
144+
@IBAction private func openWelcome(_ sender: Any) {
145145
NSApp.openWindow(.welcome)
146146
}
147147

148-
@IBAction func openAbout(_ sender: Any) {
148+
@IBAction private func openAbout(_ sender: Any) {
149149
NSApp.openWindow(.about)
150150
}
151151

@@ -155,7 +155,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
155155
FeedbackView().showWindow()
156156
}
157157

158-
@IBAction func checkForUpdates(_ sender: Any) {
158+
@IBAction private func checkForUpdates(_ sender: Any) {
159159
updater.checkForUpdates()
160160
}
161161

0 commit comments

Comments
 (0)