From f3178626d9a9037e4bf8a0c8208ee7c8a3f78771 Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Sun, 13 Nov 2022 06:52:38 -0500 Subject: [PATCH] Fix for misaligned badge in post list (#230) --- CHANGELOG.md | 1 - Shared/PostList/PostListFilteredView.swift | 7 ++++++- Shared/PostList/PostStatusBadgeView.swift | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6be7b93..0a8020d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Mac] Updated the URL and minimum version of the WriteFreely Swift package. - [Mac] Upgraded the Sparkle package to v2. - [Mac] The app now prompts you to reach out to our user forums if it detects a crash. -- [iOS] The post editor now scrolls in its entirety, including the title field. ### Fixed diff --git a/Shared/PostList/PostListFilteredView.swift b/Shared/PostList/PostListFilteredView.swift index 1af7fe1..cb52c3d 100644 --- a/Shared/PostList/PostListFilteredView.swift +++ b/Shared/PostList/PostListFilteredView.swift @@ -135,6 +135,11 @@ struct PostListFilteredView: View { struct PostListFilteredView_Previews: PreviewProvider { static var previews: some View { - return PostListFilteredView(collection: nil, showAllPosts: false, postCount: .constant(999)) + return PostListFilteredView( + collection: nil, + showAllPosts: false, + postCount: .constant(999) + ) + .environmentObject(WriteFreelyModel()) } } diff --git a/Shared/PostList/PostStatusBadgeView.swift b/Shared/PostList/PostStatusBadgeView.swift index 7a8e45e..07696c2 100644 --- a/Shared/PostList/PostStatusBadgeView.swift +++ b/Shared/PostList/PostStatusBadgeView.swift @@ -14,7 +14,6 @@ struct PostStatusBadgeView: View { .padding(EdgeInsets(top: 2.5, leading: 7.5, bottom: 2.5, trailing: 7.5)) .background(badgeColor) .clipShape(RoundedRectangle(cornerRadius: 5.0, style: .circular)) - .frame(maxWidth: .infinity) } func setupBadgeProperties(for status: PostStatus) -> (String, Color) {