From 2b2d4f47ccf054aa4176b00267873fac2771b4ca Mon Sep 17 00:00:00 2001 From: Sjmarf <78750526+Sjmarf@users.noreply.github.com> Date: Fri, 12 Jan 2024 19:55:23 +0000 Subject: [PATCH] Fix "Show score in info" setting default value inconsistency (#848) --- Mlem/Views/Shared/Comments/Comment Item.swift | 2 +- Mlem/Views/Shared/Posts/Expanded Post.swift | 2 +- Mlem/Views/Shared/Posts/Feed Post.swift | 2 +- .../Views/Appearance/Post/PostSettingsView.swift | 7 ++++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Mlem/Views/Shared/Comments/Comment Item.swift b/Mlem/Views/Shared/Comments/Comment Item.swift index 188c76103..883a5cbbc 100644 --- a/Mlem/Views/Shared/Comments/Comment Item.swift +++ b/Mlem/Views/Shared/Comments/Comment Item.swift @@ -21,7 +21,7 @@ struct CommentItem: View { @Dependency(\.hapticManager) var hapticManager // appstorage - @AppStorage("shouldShowScoreInCommentBar") var shouldShowScoreInCommentBar: Bool = true + @AppStorage("shouldShowScoreInCommentBar") var shouldShowScoreInCommentBar: Bool = false @AppStorage("showCommentDownvotesSeparately") var showCommentDownvotesSeparately: Bool = false @AppStorage("shouldShowTimeInCommentBar") var shouldShowTimeInCommentBar: Bool = true @AppStorage("shouldShowSavedInCommentBar") var shouldShowSavedInCommentBar: Bool = false diff --git a/Mlem/Views/Shared/Posts/Expanded Post.swift b/Mlem/Views/Shared/Posts/Expanded Post.swift index 29feb5489..2fe647777 100644 --- a/Mlem/Views/Shared/Posts/Expanded Post.swift +++ b/Mlem/Views/Shared/Posts/Expanded Post.swift @@ -38,7 +38,7 @@ struct ExpandedPost: View { @AppStorage("shouldShowCommunityServerInPost") var shouldShowCommunityServerInPost: Bool = false @AppStorage("shouldShowUserAvatars") var shouldShowUserAvatars: Bool = false - @AppStorage("shouldShowScoreInPostBar") var shouldShowScoreInPostBar: Bool = true + @AppStorage("shouldShowScoreInPostBar") var shouldShowScoreInPostBar: Bool = false @AppStorage("showDownvotesSeparately") var showPostDownvotesSeparately: Bool = false @AppStorage("shouldShowTimeInPostBar") var shouldShowTimeInPostBar: Bool = true @AppStorage("shouldShowSavedInPostBar") var shouldShowSavedInPostBar: Bool = false diff --git a/Mlem/Views/Shared/Posts/Feed Post.swift b/Mlem/Views/Shared/Posts/Feed Post.swift index b2509fcfa..3920122bb 100644 --- a/Mlem/Views/Shared/Posts/Feed Post.swift +++ b/Mlem/Views/Shared/Posts/Feed Post.swift @@ -33,7 +33,7 @@ struct FeedPost: View { @AppStorage("shouldShowCommunityServerInPost") var shouldShowCommunityServerInPost: Bool = true @AppStorage("shouldShowUserServerInPost") var shouldShowUserServerInPost: Bool = true - @AppStorage("shouldShowScoreInPostBar") var shouldShowScoreInPostBar: Bool = true + @AppStorage("shouldShowScoreInPostBar") var shouldShowScoreInPostBar: Bool = false @AppStorage("showDownvotesSeparately") var showPostDownvotesSeparately: Bool = false @AppStorage("shouldShowTimeInPostBar") var shouldShowTimeInPostBar: Bool = true @AppStorage("shouldShowSavedInPostBar") var shouldShowSavedInPostBar: Bool = false diff --git a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Post/PostSettingsView.swift b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Post/PostSettingsView.swift index f2cd55be5..f3a690e88 100644 --- a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Post/PostSettingsView.swift +++ b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Post/PostSettingsView.swift @@ -108,7 +108,7 @@ struct PostSettingsView: View { ) } - Section("Interactions and Info") { + Section { SwitchableSettingsItem( settingPictureSystemName: Icons.upvoteSquare, settingName: "Show Score In Info", @@ -134,6 +134,11 @@ struct PostSettingsView: View { settingName: "Show Replies In Info", isTicked: $shouldShowRepliesInPostBar ) + } header: { + Text("Interactions and Info") + } footer: { + // swiftlint:disable:next line_length + Text("Choose which information is shown when using Large or Headline mode. In Compact mode, all info stack widgets are shown.") } Section("Website Previews") {