iOS: Fix toolbars disappearing when scrolling too far up
This commit is contained in:
parent
012ada4af7
commit
1449dc215b
|
@ -49,11 +49,16 @@ struct ContentView: View {
|
|||
// It's not actually user scrolling, and this screws up our animation, so we ignore it.
|
||||
guard abs(delta) != outer.safeAreaInsets.top else { return }
|
||||
|
||||
if delta != 0 {
|
||||
barOffset += delta
|
||||
if scrollOffset < 0 {
|
||||
barOffset = 0
|
||||
} else {
|
||||
if delta != 0 {
|
||||
barOffset += delta
|
||||
}
|
||||
|
||||
print(barOffset)
|
||||
barOffset = max(0, min(navBarHeight + outer.safeAreaInsets.top, barOffset))
|
||||
}
|
||||
|
||||
barOffset = max(0, min(navBarHeight + outer.safeAreaInsets.top, barOffset))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +68,7 @@ struct ContentView: View {
|
|||
Color.clear.preference(key: NavBarHeightPrefKey.self, value: geom.frame(in: .global).height)
|
||||
})
|
||||
.offset(y: -barOffset)
|
||||
|
||||
|
||||
Spacer()
|
||||
|
||||
ToolBar(navigator: navigator, shareCurrentURL: shareCurrentURL)
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<EnvironmentVariable
|
||||
key = "DEFAULT_URL"
|
||||
value = "gemini://drewdevault.com"
|
||||
isEnabled = "YES">
|
||||
isEnabled = "NO">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
|
|
Loading…
Reference in New Issue