Group appearance prefs into sections

This commit is contained in:
Shadowfacts 2020-08-16 14:58:10 -04:00
parent 059f7307b3
commit 722b81dad9
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 14 additions and 2 deletions

View File

@ -30,12 +30,26 @@ struct AppearancePrefsView : View {
Text("Light").tag(UIUserInterfaceStyle.light)
Text("Dark").tag(UIUserInterfaceStyle.dark)
}
accountsSection
postsSection
}
.listStyle(GroupedListStyle())
.navigationBarTitle(Text("Appearance"))
}
private var accountsSection: some View {
Section(header: Text("Accounts")) {
Toggle(isOn: useCircularAvatars) {
Text("Use Circular Avatars")
}
Toggle(isOn: $preferences.hideCustomEmojiInUsernames) {
Text("Hide Custom Emoji in Usernames")
}
}
}
private var postsSection: some View {
Section(header: Text("Posts")) {
Toggle(isOn: $preferences.showIsStatusReplyIcon) {
Text("Show Status Reply Icons")
}
@ -43,8 +57,6 @@ struct AppearancePrefsView : View {
Text("Always Show Status Visibility Icons")
}
}
.listStyle(GroupedListStyle())
.navigationBarTitle(Text("Appearance"))
}
}