summaryrefslogtreecommitdiff
path: root/Sora/Data/Scroll/ScrollPositionPreferenceKey.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-07-11 06:32:46 -0700
committerFuwn <[email protected]>2025-07-11 06:32:46 -0700
commit2e079945cb3c68ed05750757b59f0acc59155010 (patch)
tree23901f3b5ef4956f7983bccc2922b9b9378dfcbb /Sora/Data/Scroll/ScrollPositionPreferenceKey.swift
parentfeat: Development commit (diff)
downloadsora-testing-2e079945cb3c68ed05750757b59f0acc59155010.tar.xz
sora-testing-2e079945cb3c68ed05750757b59f0acc59155010.zip
feat: Development commit
Diffstat (limited to 'Sora/Data/Scroll/ScrollPositionPreferenceKey.swift')
-rw-r--r--Sora/Data/Scroll/ScrollPositionPreferenceKey.swift19
1 files changed, 0 insertions, 19 deletions
diff --git a/Sora/Data/Scroll/ScrollPositionPreferenceKey.swift b/Sora/Data/Scroll/ScrollPositionPreferenceKey.swift
deleted file mode 100644
index 6b78bdc..0000000
--- a/Sora/Data/Scroll/ScrollPositionPreferenceKey.swift
+++ /dev/null
@@ -1,19 +0,0 @@
-import SwiftUI
-
-struct ScrollPositionPreferenceKey: PreferenceKey {
- typealias Value = ScrollPositionPreference?
-
- static var defaultValue: Value = nil
-
- static func reduce(value: inout Value, nextValue: () -> Value) {
- guard let next = nextValue() else { return }
-
- if let current = value {
- if abs(next.yPosition) < abs(current.yPosition) {
- value = next
- }
- } else {
- value = next
- }
- }
-}