From 722b81dad9a260fae4580aa694bfa0125082517b Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 16 Aug 2020 14:58:10 -0400 Subject: [PATCH] Group appearance prefs into sections --- .../Preferences/AppearancePrefsView.swift | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Tusker/Screens/Preferences/AppearancePrefsView.swift b/Tusker/Screens/Preferences/AppearancePrefsView.swift index 966d97ca..d00195f9 100644 --- a/Tusker/Screens/Preferences/AppearancePrefsView.swift +++ b/Tusker/Screens/Preferences/AppearancePrefsView.swift @@ -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")) } }