Make shell hide/show animation smoother (#1683)

* Make shell hide/show animation smoother

* Also animate "load latest"
This commit is contained in:
dan
2023-10-12 21:02:17 +01:00
committed by GitHub
parent c2a1cf4e56
commit 997918547c
3 changed files with 17 additions and 8 deletions
+4 -3
View File
@@ -7,21 +7,22 @@ export function useMinimalShellMode() {
const store = useStores()
const minimalShellInterp = useAnimatedValue(0)
const footerMinimalShellTransform = {
transform: [{translateY: Animated.multiply(minimalShellInterp, 100)}],
opacity: Animated.subtract(1, minimalShellInterp),
transform: [{translateY: Animated.multiply(minimalShellInterp, 50)}],
}
React.useEffect(() => {
if (store.shell.minimalShellMode) {
Animated.timing(minimalShellInterp, {
toValue: 1,
duration: 100,
duration: 150,
useNativeDriver: true,
isInteraction: false,
}).start()
} else {
Animated.timing(minimalShellInterp, {
toValue: 0,
duration: 100,
duration: 150,
useNativeDriver: true,
isInteraction: false,
}).start()