Fix navigation
This commit is contained in:
parent
86dfcf0515
commit
442159ab78
9 changed files with 45 additions and 20 deletions
|
|
@ -30,7 +30,7 @@
|
|||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:launchMode="singleTask"
|
||||
android:taskAffinity="">
|
||||
<intent-filter>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import React from 'react';
|
||||
import {StyleSheet, TextStyle, View} from 'react-native';
|
||||
import React, {useEffect} from 'react';
|
||||
import {Keyboard, StyleSheet, TextStyle, View} from 'react-native';
|
||||
import DeviceInfo from 'react-native-device-info';
|
||||
import Animated, {useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated';
|
||||
|
||||
import FormattedText from '@components/formatted_text';
|
||||
import {t} from '@i18n';
|
||||
|
|
@ -26,6 +27,27 @@ type AppVersionProps = {
|
|||
}
|
||||
|
||||
const AppVersion = ({isWrapped = true, textStyle = {}}: AppVersionProps) => {
|
||||
const opacity = useSharedValue(1);
|
||||
const animatedStyle = useAnimatedStyle(() => {
|
||||
return {
|
||||
opacity: withTiming(opacity.value, {duration: 250}),
|
||||
};
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const willHide = Keyboard.addListener('keyboardDidHide', () => {
|
||||
opacity.value = 1;
|
||||
});
|
||||
const willShow = Keyboard.addListener('keyboardDidShow', () => {
|
||||
opacity.value = 0;
|
||||
});
|
||||
|
||||
return () => {
|
||||
willHide.remove();
|
||||
willShow.remove();
|
||||
};
|
||||
}, []);
|
||||
|
||||
const appVersion = (
|
||||
<FormattedText
|
||||
id={t('mobile.about.appVersion')}
|
||||
|
|
@ -43,11 +65,14 @@ const AppVersion = ({isWrapped = true, textStyle = {}}: AppVersionProps) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<View pointerEvents='none'>
|
||||
<Animated.View
|
||||
pointerEvents='none'
|
||||
style={animatedStyle}
|
||||
>
|
||||
<View style={style.info}>
|
||||
{appVersion}
|
||||
</View>
|
||||
</View>
|
||||
</Animated.View>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ const ForgotPassword = ({serverUrl, theme}: Props) => {
|
|||
bounces={false}
|
||||
contentContainerStyle={styles.innerContainer}
|
||||
enableAutomaticScroll={Platform.OS === 'android'}
|
||||
enableOnAndroid={true}
|
||||
enableOnAndroid={false}
|
||||
enableResetScrollToCoords={true}
|
||||
extraScrollHeight={0}
|
||||
keyboardDismissMode='on-drag'
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ const LoginOptions = ({config, extra, hasLoginForm, launchType, launchError, lic
|
|||
bounces={false}
|
||||
contentContainerStyle={[styles.innerContainer, additionalContainerStyle]}
|
||||
enableAutomaticScroll={Platform.OS === 'android'}
|
||||
enableOnAndroid={true}
|
||||
enableOnAndroid={false}
|
||||
enableResetScrollToCoords={true}
|
||||
extraScrollHeight={0}
|
||||
keyboardDismissMode='on-drag'
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ const Server = ({componentId, extra, launchType, launchError, theme}: ServerProp
|
|||
bounces={false}
|
||||
contentContainerStyle={styles.scrollContainer}
|
||||
enableAutomaticScroll={Platform.OS === 'android'}
|
||||
enableOnAndroid={true}
|
||||
enableOnAndroid={false}
|
||||
enableResetScrollToCoords={true}
|
||||
extraScrollHeight={20}
|
||||
keyboardDismissMode='on-drag'
|
||||
|
|
|
|||
|
|
@ -362,13 +362,13 @@ PODS:
|
|||
- React-Core
|
||||
- ReactNativeKeyboardTrackingView (5.7.0):
|
||||
- React
|
||||
- ReactNativeNavigation (7.24.0):
|
||||
- ReactNativeNavigation (7.24.1):
|
||||
- HMSegmentedControl
|
||||
- React-Core
|
||||
- React-RCTImage
|
||||
- React-RCTText
|
||||
- ReactNativeNavigation/Core (= 7.24.0)
|
||||
- ReactNativeNavigation/Core (7.24.0):
|
||||
- ReactNativeNavigation/Core (= 7.24.1)
|
||||
- ReactNativeNavigation/Core (7.24.1):
|
||||
- HMSegmentedControl
|
||||
- React-Core
|
||||
- React-RCTImage
|
||||
|
|
@ -802,7 +802,7 @@ SPEC CHECKSUMS:
|
|||
ReactNativeART: 78edc68dd4a1e675338cd0cd113319cf3a65f2ab
|
||||
ReactNativeExceptionHandler: b11ff67c78802b2f62eed0e10e75cb1ef7947c60
|
||||
ReactNativeKeyboardTrackingView: 02137fac3b2ebd330d74fa54ead48b14750a2306
|
||||
ReactNativeNavigation: 61887ca5804d6eb3185c52593ee8e211fb8cd7eb
|
||||
ReactNativeNavigation: 23ac4081ca7439b35412242cb3a0a33adf615887
|
||||
RNCAsyncStorage: ea6b5c280997b2b32a587793163b1f10e580c4f7
|
||||
RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495
|
||||
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
|
||||
|
|
|
|||
14
package-lock.json
generated
14
package-lock.json
generated
|
|
@ -67,7 +67,7 @@
|
|||
"react-native-keychain": "8.0.0",
|
||||
"react-native-linear-gradient": "2.5.6",
|
||||
"react-native-localize": "2.1.5",
|
||||
"react-native-navigation": "7.24.0",
|
||||
"react-native-navigation": "7.24.1",
|
||||
"react-native-neomorph-shadows": "1.1.2",
|
||||
"react-native-notifications": "4.1.2",
|
||||
"react-native-permissions": "3.1.0",
|
||||
|
|
@ -19824,9 +19824,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/react-native-navigation": {
|
||||
"version": "7.24.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-navigation/-/react-native-navigation-7.24.0.tgz",
|
||||
"integrity": "sha512-ReDJ6vgFClOgorczLl972cgmML4xx5QRXIW26ZjXUtTLcHiMYdI1yVyeZnCCAYk5CAmMUAI6pSnq0RY9ncy1og==",
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-navigation/-/react-native-navigation-7.24.1.tgz",
|
||||
"integrity": "sha512-O6ZOFs2WKeV9o8zoJWEQ+6GfBs8NRXieR90yP/DcoPNE12Uvd1s0Bt3ssVcfY9dX3TcPxTsIn5CmxTZs4EFZ0w==",
|
||||
"dependencies": {
|
||||
"hoist-non-react-statics": "3.x.x",
|
||||
"lodash": "4.17.x",
|
||||
|
|
@ -39969,9 +39969,9 @@
|
|||
"requires": {}
|
||||
},
|
||||
"react-native-navigation": {
|
||||
"version": "7.24.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-navigation/-/react-native-navigation-7.24.0.tgz",
|
||||
"integrity": "sha512-ReDJ6vgFClOgorczLl972cgmML4xx5QRXIW26ZjXUtTLcHiMYdI1yVyeZnCCAYk5CAmMUAI6pSnq0RY9ncy1og==",
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-navigation/-/react-native-navigation-7.24.1.tgz",
|
||||
"integrity": "sha512-O6ZOFs2WKeV9o8zoJWEQ+6GfBs8NRXieR90yP/DcoPNE12Uvd1s0Bt3ssVcfY9dX3TcPxTsIn5CmxTZs4EFZ0w==",
|
||||
"requires": {
|
||||
"hoist-non-react-statics": "3.x.x",
|
||||
"lodash": "4.17.x",
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
"react-native-keychain": "8.0.0",
|
||||
"react-native-linear-gradient": "2.5.6",
|
||||
"react-native-localize": "2.1.5",
|
||||
"react-native-navigation": "7.24.0",
|
||||
"react-native-navigation": "7.24.1",
|
||||
"react-native-neomorph-shadows": "1.1.2",
|
||||
"react-native-notifications": "4.1.2",
|
||||
"react-native-permissions": "3.1.0",
|
||||
|
|
|
|||
Loading…
Reference in a new issue