mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-28 17:59:31 +01:00
1f6f5fa054
This makes use of `@AppStorage` for preferences. Severeral more need to migrated from AppDefaults etc.
34 lines
976 B
Swift
34 lines
976 B
Swift
//
|
|
// GeneralPreferencesView.swift
|
|
// macOS
|
|
//
|
|
// Created by Stuart Breckenridge on 27/6/20.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct GeneralPreferencesView: View {
|
|
|
|
@ObservedObject private var preferences = MacPreferences()
|
|
|
|
var body: some View {
|
|
VStack {
|
|
Form {
|
|
Picker("Refresh Feeds",
|
|
selection: $preferences.refreshFrequency,
|
|
content: {
|
|
ForEach(0..<preferences.refreshIntervals.count, content: {
|
|
Text(preferences.refreshIntervals[$0])
|
|
})
|
|
}).frame(width: 300, alignment: .center)
|
|
|
|
Toggle("Open webpages in background in browser", isOn: $preferences.openInBackground)
|
|
|
|
Toggle("Show Unread Count in Dock", isOn: $preferences.showUnreadCountInDock)
|
|
}
|
|
Spacer()
|
|
}.frame(width: 300, alignment: .center)
|
|
}
|
|
|
|
}
|