forked from shadowfacts/Tusker
42 lines
1.0 KiB
Swift
42 lines
1.0 KiB
Swift
// BehaviorPrefsView.swift
|
|
// Tusker
|
|
//
|
|
// Created by Shadowfacts on 6/13/19.
|
|
// Copyright © 2019 Shadowfacts. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
import Pachyderm
|
|
|
|
struct BehaviorPrefsView: View {
|
|
@ObservedObject var preferences = Preferences.shared
|
|
|
|
var body: some View {
|
|
List {
|
|
linksSection
|
|
}.listStyle(GroupedListStyle()).navigationBarTitle(Text("Behavior"))
|
|
}
|
|
|
|
var linksSection: some View {
|
|
Section(header: Text("LINKS")) {
|
|
Toggle(isOn: $preferences.openLinksInApps) {
|
|
Text("Open Links in Apps")
|
|
}
|
|
Toggle(isOn: $preferences.useInAppSafari) {
|
|
Text("Use In-App Safari")
|
|
}
|
|
Toggle(isOn: $preferences.inAppSafariAutomaticReaderMode) {
|
|
Text("Always Use Reader Mode in In-App Safari")
|
|
}.disabled(!preferences.useInAppSafari)
|
|
}
|
|
}
|
|
}
|
|
|
|
#if DEBUG
|
|
struct BehaviorPrefsView_Previews : PreviewProvider {
|
|
static var previews: some View {
|
|
BehaviorPrefsView()
|
|
}
|
|
}
|
|
#endif
|