From d661c4bca58919759879439977a2a8b3f909dd40 Mon Sep 17 00:00:00 2001 From: Eric Andrews Date: Fri, 27 Sep 2024 11:54:28 -0400 Subject: [PATCH] fix mark read on scroll not respecting toggle --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- .../Views/View Modifiers/View+MarkReadOnScroll.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ac29670d4..fa69126d0 100644 --- a/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "693546cfc633cb179f53728b918542e0d98a3518ffce28aa97b5c239441ee75a", + "originHash" : "6e48be56886eee62f689ed8f35a8f64875438c9d44aaffb7879ee001a578a527", "pins" : [ { "identity" : "combine-schedulers", @@ -31,7 +31,7 @@ { "identity" : "mlemmiddleware", "kind" : "remoteSourceControl", - "location" : "https://github.com/mlemgroup/MlemMiddleware.git", + "location" : "https://github.com/mlemgroup/MlemMiddleware", "state" : { "revision" : "1486eb4ed2834cc56f047535e42346bcbc2d5c19", "version" : "0.38.0" diff --git a/Mlem/App/Utility/Extensions/Views/View Modifiers/View+MarkReadOnScroll.swift b/Mlem/App/Utility/Extensions/Views/View Modifiers/View+MarkReadOnScroll.swift index afdbcbe63..33bb534e3 100644 --- a/Mlem/App/Utility/Extensions/Views/View Modifiers/View+MarkReadOnScroll.swift +++ b/Mlem/App/Utility/Extensions/Views/View Modifiers/View+MarkReadOnScroll.swift @@ -32,7 +32,7 @@ private struct MarkReadOnScroll: ViewModifier { .onGeometryChange(for: Bool.self) { geometry in geometry.frame(in: .global).maxY < 0 } action: { wasAboveTop, isAboveTop in - if !wasAboveTop, isAboveTop { + if markReadOnScroll, !wasAboveTop, isAboveTop { post.updateRead(true, shouldQueue: true) } }