From 0672654b15b3cae7a87a302ad654f7bcc5974827 Mon Sep 17 00:00:00 2001 From: Sjmarf <78750526+Sjmarf@users.noreply.github.com> Date: Fri, 12 Jan 2024 06:18:00 +0000 Subject: [PATCH 1/2] Fix toggling "hide read" not immediately updating (#852) --- Mlem/Views/Tabs/Feeds/PostFeedView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Mlem/Views/Tabs/Feeds/PostFeedView.swift b/Mlem/Views/Tabs/Feeds/PostFeedView.swift index 0665a48e0..c0ff94f84 100644 --- a/Mlem/Views/Tabs/Feeds/PostFeedView.swift +++ b/Mlem/Views/Tabs/Feeds/PostFeedView.swift @@ -112,6 +112,7 @@ struct PostFeedView: View { } .onChange(of: showReadPosts) { _ in Task(priority: .userInitiated) { + postTracker.filter = self.filter await postTracker.refresh(clearBeforeFetch: true) } } From 589a3741d187b1d683298616f142af3f4f9613e0 Mon Sep 17 00:00:00 2001 From: Sjmarf <78750526+Sjmarf@users.noreply.github.com> Date: Fri, 12 Jan 2024 19:31:40 +0000 Subject: [PATCH 2/2] Fix community "Favorite" action being shown when it shouldn't (#849) --- .../Models/Content/Community/CommunityModel+MenuFunctions.swift | 2 +- Mlem/Models/Content/Community/CommunityModel+SwipeActions.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mlem/Models/Content/Community/CommunityModel+MenuFunctions.swift b/Mlem/Models/Content/Community/CommunityModel+MenuFunctions.swift index 91c34e799..aee6f65d7 100644 --- a/Mlem/Models/Content/Community/CommunityModel+MenuFunctions.swift +++ b/Mlem/Models/Content/Community/CommunityModel+MenuFunctions.swift @@ -96,8 +96,8 @@ extension CommunityModel { } if let function = try? subscribeMenuFunction(callback) { functions.append(.standard(function)) + functions.append(.standard(favoriteMenuFunction(callback))) } - functions.append(.standard(favoriteMenuFunction(callback))) functions.append( .standardMenuFunction( text: "Copy Name", diff --git a/Mlem/Models/Content/Community/CommunityModel+SwipeActions.swift b/Mlem/Models/Content/Community/CommunityModel+SwipeActions.swift index e0785ea83..3a4e22eb7 100644 --- a/Mlem/Models/Content/Community/CommunityModel+SwipeActions.swift +++ b/Mlem/Models/Content/Community/CommunityModel+SwipeActions.swift @@ -78,8 +78,8 @@ extension CommunityModel { if let subscribeAction { trailingActions.append(subscribeAction) + trailingActions.append(favoriteAction) } - trailingActions.append(favoriteAction) return SwipeConfiguration(leadingActions: [], trailingActions: trailingActions) }