2019-06-14 00:53:17 +00:00
|
|
|
// AppearancePrefsView.swift
|
|
|
|
// Tusker
|
|
|
|
//
|
|
|
|
// Created by Shadowfacts on 6/13/19.
|
|
|
|
// Copyright © 2019 Shadowfacts. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct AppearancePrefsView : View {
|
|
|
|
@Preference(\.showRepliesInProfiles) var showRepliesInProfiles: Bool
|
|
|
|
@Preference(\.hideCustomEmojiInUsernames) var hideCustomEmojiInUsernames: Bool
|
|
|
|
|
|
|
|
@MappedPreference(\.avatarStyle, fromPref: { $0 == .circle }, toPref: { $0 ? .circle : .roundRect })
|
|
|
|
var useCircularAvatars: Bool
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
List {
|
2019-07-18 22:44:35 +00:00
|
|
|
Toggle(isOn: _showRepliesInProfiles.binding) {
|
2019-06-14 00:53:17 +00:00
|
|
|
Text("Show Replies in Profiles")
|
|
|
|
}
|
2019-07-18 22:44:35 +00:00
|
|
|
Toggle(isOn: _useCircularAvatars.binding) {
|
2019-06-14 00:53:17 +00:00
|
|
|
Text("Use Circular Avatars")
|
|
|
|
}
|
2019-07-18 22:44:35 +00:00
|
|
|
Toggle(isOn: _hideCustomEmojiInUsernames.binding) {
|
2019-06-14 00:53:17 +00:00
|
|
|
Text("Hide Custom Emoji in Usernames")
|
|
|
|
}
|
|
|
|
}
|
2019-08-06 03:08:00 +00:00
|
|
|
.listStyle(GroupedListStyle())
|
2019-06-14 00:53:17 +00:00
|
|
|
.navigationBarTitle(Text("Appearance"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#if DEBUG
|
|
|
|
struct AppearancePrefsView_Previews : PreviewProvider {
|
|
|
|
static var previews: some View {
|
|
|
|
AppearancePrefsView()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|