mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-24 16:51:19 +01:00
Move WebKit "inspector starts attached" user default to AppDefaults
This commit is contained in:
parent
4a2724bcc4
commit
1e840f3090
@ -38,6 +38,7 @@ struct AppDefaults {
|
|||||||
static let hideDockUnreadCount = "JustinMillerHideDockUnreadCount"
|
static let hideDockUnreadCount = "JustinMillerHideDockUnreadCount"
|
||||||
|
|
||||||
static let webInspectorEnabled = "WebInspectorEnabled"
|
static let webInspectorEnabled = "WebInspectorEnabled"
|
||||||
|
static let webInspectorStartsAttached = "__WebInspectorPageGroupLevel1__.WebKit2InspectorStartsAttached"
|
||||||
}
|
}
|
||||||
|
|
||||||
private static let smallestFontSizeRawValue = FontSize.small.rawValue
|
private static let smallestFontSizeRawValue = FontSize.small.rawValue
|
||||||
@ -149,6 +150,15 @@ struct AppDefaults {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static var webInspectorStartsAttached: Bool {
|
||||||
|
get {
|
||||||
|
return bool(for: Key.webInspectorStartsAttached)
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
setBool(for: Key.webInspectorStartsAttached, newValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static var timelineSortDirection: ComparisonResult {
|
static var timelineSortDirection: ComparisonResult {
|
||||||
get {
|
get {
|
||||||
return sortDirection(for: Key.timelineSortDirection)
|
return sortDirection(for: Key.timelineSortDirection)
|
||||||
|
@ -534,7 +534,7 @@ extension AppDelegate {
|
|||||||
AppDefaults.webInspectorEnabled = newValue
|
AppDefaults.webInspectorEnabled = newValue
|
||||||
// An attached inspector can display incorrectly on certain setups (like mine); default to displaying in a separate window,
|
// An attached inspector can display incorrectly on certain setups (like mine); default to displaying in a separate window,
|
||||||
// and reset to a separate window when the preference is toggled off and on again in case the inspector is accidentally reattached.
|
// and reset to a separate window when the preference is toggled off and on again in case the inspector is accidentally reattached.
|
||||||
UserDefaults.standard.set(false, forKey: "__WebInspectorPageGroupLevel1__.WebKit2InspectorStartsAttached")
|
AppDefaults.webInspectorStartsAttached = false
|
||||||
NotificationCenter.default.post(name: .WebInspectorEnabledDidChange, object: newValue)
|
NotificationCenter.default.post(name: .WebInspectorEnabledDidChange, object: newValue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user