Make shell hide/show animation smoother (#1683)
* Make shell hide/show animation smoother * Also animate "load latest"
This commit is contained in:
parent
c2a1cf4e56
commit
997918547c
3 changed files with 17 additions and 8 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue