mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 00:04:25 +00:00
Skip saving state for utility windows when running unit tests. Skip opening utility windows when running unit tests.
This commit is contained in:
1 parent
054a6fdd46
commit
bdeb7ea25e
1 file changed
+24
-22
+24
-22
@@ -223,28 +223,25 @@ let appName = "NetNewsWire"
|
||||
self.unreadCount = AccountManager.shared.unreadCount
|
||||
}
|
||||
|
||||
if InspectorWindowController.shouldOpenAtStartup {
|
||||
toggleInspectorWindow(self)
|
||||
}
|
||||
|
||||
if CurrentActivityWindowController.shouldOpenAtStartup {
|
||||
showActivityWindow(self)
|
||||
}
|
||||
|
||||
if ActivityLogWindowController.shouldOpenAtStartup {
|
||||
showActivityLog(self)
|
||||
}
|
||||
|
||||
if ErrorLogWindowController.shouldOpenAtStartup {
|
||||
showErrorLog(self)
|
||||
}
|
||||
|
||||
if AccountStatsWindowController.shouldOpenAtStartup {
|
||||
showAccountStats(self)
|
||||
}
|
||||
|
||||
if DinosaursWindowController.shouldOpenAtStartup {
|
||||
showDinosaursWindow(self)
|
||||
if !Platform.isRunningUnitTests {
|
||||
if InspectorWindowController.shouldOpenAtStartup {
|
||||
toggleInspectorWindow(self)
|
||||
}
|
||||
if CurrentActivityWindowController.shouldOpenAtStartup {
|
||||
showActivityWindow(self)
|
||||
}
|
||||
if ActivityLogWindowController.shouldOpenAtStartup {
|
||||
showActivityLog(self)
|
||||
}
|
||||
if ErrorLogWindowController.shouldOpenAtStartup {
|
||||
showErrorLog(self)
|
||||
}
|
||||
if AccountStatsWindowController.shouldOpenAtStartup {
|
||||
showAccountStats(self)
|
||||
}
|
||||
if DinosaursWindowController.shouldOpenAtStartup {
|
||||
showDinosaursWindow(self)
|
||||
}
|
||||
}
|
||||
|
||||
ArticleThemesManager.shared.start()
|
||||
@@ -892,7 +889,12 @@ extension AppDelegate {
|
||||
}
|
||||
|
||||
func saveState() {
|
||||
guard !Platform.isRunningUnitTests else {
|
||||
return
|
||||
}
|
||||
|
||||
mainWindowController?.saveStateToUserDefaults()
|
||||
|
||||
inspectorWindowController?.saveState()
|
||||
activityWindowController?.saveState()
|
||||
activityLogWindowController?.saveState()
|
||||
|
||||
Reference in new issue
Block a user