Add refresh interval to settings again

This commit is contained in:
Maurice Parker
2019-09-07 14:33:15 -05:00
parent 3b4ec7262f
commit a4b30c2f0e
3 changed files with 35 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
//
// RefreshInterval-Extensions.swift
// NetNewsWire-iOS
//
// Created by Maurice Parker on 9/7/19.
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import Foundation
extension RefreshInterval: Identifiable {
var id: Int {
return rawValue
}
}

View File

@@ -41,12 +41,12 @@ struct SettingsView : View {
}
}
// Section(header: Text("DATABASE")) {
// Picker(selection: $viewModel.refreshInterval, label: Text("Refresh Interval")) {
// ForEach(RefreshInterval.allCases.identified(by: \.self)) { interval in
// Text(interval.description()).tag(interval)
// }
// }
Section(header: Text("DATABASE")) {
Picker(selection: $viewModel.refreshInterval, label: Text("Refresh Interval")) {
ForEach(RefreshInterval.allCases) { interval in
Text(interval.description()).tag(interval)
}
}
// Button(action: {
// self.subscriptionsImportAccounts = self.createSubscriptionsImportAccounts
// }) {
@@ -61,8 +61,8 @@ struct SettingsView : View {
// }
// .presentation(subscriptionsExportAccounts)
// .presentation(subscriptionsExportDocumentPicker)
// }
// .foregroundColor(.primary)
}
.foregroundColor(.primary)
Section(header: Text("ABOUT"), footer: buildFooter) {
Text("About NetNewsWire")