@@ -46,6 +46,8 @@ struct AboutDetailView<Content: View>: View {
4646 }
4747 . frame ( maxWidth: . infinity)
4848 . matchedGeometryEffect ( id: " ScrollView " , in: namespace, properties: . position, anchor: . top)
49+ . blur ( radius: aboutMode != . about ? 0 : 10 )
50+ . opacity ( aboutMode != . about ? 1 : 0 )
4951 . clipShape ( Rectangle ( ) )
5052 }
5153
@@ -113,6 +115,8 @@ struct AboutDetailView<Content: View>: View {
113115 }
114116 . contentShape ( Rectangle ( ) )
115117 . matchedGeometryEffect ( id: " Title " , in: namespace, properties: . position, anchor: . center)
118+ . blur ( radius: aboutMode != . about ? 0 : 10 )
119+ . opacity ( aboutMode != . about ? 1 : 0 )
116120 }
117121 . buttonStyle ( . plain)
118122
@@ -135,9 +139,17 @@ struct AboutDetailView<Content: View>: View {
135139 minOffset: CGFloat ,
136140 maxOffset: CGFloat
137141 ) -> CGFloat {
142+ let currentOffset = scrollOffset
143+ let threshold : CGFloat = 1.0
144+
145+ /// Prevents unnecessary view updates if the scroll offset is below the threshold
146+ if abs ( currentOffset) < threshold {
147+ return minValue
148+ }
149+
138150 let valueRange = maxValue - minValue
139151 let offsetRange = maxOffset - minOffset
140- let currentOffset = scrollOffset
152+
141153 let percentage = ( currentOffset - minOffset) / offsetRange
142154 let value = minValue + ( valueRange * percentage)
143155
0 commit comments