mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
parent
2d673902a4
commit
2656666ed8
@ -577,7 +577,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
<Text key="label" style={this.styles().settingText}>
|
||||
{md.label()}
|
||||
</Text>
|
||||
<TextInput autoCorrect={false} autoCompleteType="off" selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} autoCapitalize="none" key="control" style={this.styles().settingControl} value={value} onChangeText={(value: any) => updateSettingValue(key, value)} secureTextEntry={!!md.secure} />
|
||||
<TextInput autoCorrect={false} autoComplete="off" selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} autoCapitalize="none" key="control" style={this.styles().settingControl} value={value} onChangeText={(value: any) => updateSettingValue(key, value)} secureTextEntry={!!md.secure} />
|
||||
</View>
|
||||
);
|
||||
} else {
|
||||
|
@ -95,7 +95,7 @@
|
||||
"@lezer/highlight": "1.1.3",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/jest": "29.2.6",
|
||||
"@types/react-native": "0.64.19",
|
||||
"@types/react-native": "0.70.6",
|
||||
"@types/react-redux": "7.1.25",
|
||||
"babel-plugin-module-resolver": "4.1.0",
|
||||
"execa": "4.1.0",
|
||||
|
@ -28,8 +28,8 @@ import SyncTargetJoplinCloud from '@joplin/lib/SyncTargetJoplinCloud';
|
||||
import SyncTargetOneDrive from '@joplin/lib/SyncTargetOneDrive';
|
||||
import initProfile from '@joplin/lib/services/profileConfig/initProfile';
|
||||
const VersionInfo = require('react-native-version-info').default;
|
||||
const { Keyboard, NativeModules, BackHandler, Animated, View, StatusBar, Linking, Platform, Dimensions } = require('react-native');
|
||||
const RNAppState = require('react-native').AppState;
|
||||
const { Keyboard, NativeModules, BackHandler, Animated, View, StatusBar, Platform, Dimensions } = require('react-native');
|
||||
import { AppState as RNAppState, EmitterSubscription, Linking, NativeEventSubscription } from 'react-native';
|
||||
import getResponsiveValue from './components/getResponsiveValue';
|
||||
import NetInfo from '@react-native-community/netinfo';
|
||||
const DropdownAlert = require('react-native-dropdownalert').default;
|
||||
@ -704,6 +704,9 @@ async function initialize(dispatch: Function) {
|
||||
|
||||
class AppComponent extends React.Component {
|
||||
|
||||
private urlOpenListener_: EmitterSubscription|null = null;
|
||||
private appStateChangeListener_: NativeEventSubscription|null = null;
|
||||
|
||||
public constructor() {
|
||||
super();
|
||||
|
||||
@ -796,7 +799,7 @@ class AppComponent extends React.Component {
|
||||
// }, 1000);
|
||||
}
|
||||
|
||||
Linking.addEventListener('url', this.handleOpenURL_);
|
||||
this.urlOpenListener_ = Linking.addEventListener('url', this.handleOpenURL_);
|
||||
|
||||
BackButtonService.initialize(this.backButtonHandler_);
|
||||
|
||||
@ -806,7 +809,7 @@ class AppComponent extends React.Component {
|
||||
this.dropdownAlert_.alertWithType('info', notification.title, notification.body ? notification.body : '');
|
||||
});
|
||||
|
||||
RNAppState.addEventListener('change', this.onAppStateChange_);
|
||||
this.appStateChangeListener_ = RNAppState.addEventListener('change', this.onAppStateChange_);
|
||||
this.unsubscribeScreenWidthChangeHandler_ = Dimensions.addEventListener('change', this.handleScreenWidthChange_);
|
||||
|
||||
await this.handleShareData();
|
||||
@ -820,8 +823,15 @@ class AppComponent extends React.Component {
|
||||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
RNAppState.removeEventListener('change', this.onAppStateChange_);
|
||||
Linking.removeEventListener('url', this.handleOpenURL_);
|
||||
if (this.appStateChangeListener_) {
|
||||
this.appStateChangeListener_.remove();
|
||||
this.appStateChangeListener_ = null;
|
||||
}
|
||||
|
||||
if (this.urlOpenListener_) {
|
||||
this.urlOpenListener_.remove();
|
||||
this.urlOpenListener_ = null;
|
||||
}
|
||||
|
||||
if (this.unsubscribeScreenWidthChangeHandler_) {
|
||||
this.unsubscribeScreenWidthChangeHandler_.remove();
|
||||
|
11
yarn.lock
11
yarn.lock
@ -4712,7 +4712,7 @@ __metadata:
|
||||
"@react-native-community/slider": 4.4.1
|
||||
"@types/fs-extra": 9.0.13
|
||||
"@types/jest": 29.2.6
|
||||
"@types/react-native": 0.64.19
|
||||
"@types/react-native": 0.70.6
|
||||
"@types/react-redux": 7.1.25
|
||||
assert-browserify: 2.0.0
|
||||
babel-plugin-module-resolver: 4.1.0
|
||||
@ -7710,6 +7710,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react-native@npm:0.70.6":
|
||||
version: 0.70.6
|
||||
resolution: "@types/react-native@npm:0.70.6"
|
||||
dependencies:
|
||||
"@types/react": "*"
|
||||
checksum: 1b620095ddf2fe85157df9d57435edc619587eacb1a4fadd91c977c200cef8008e7fec4d8c5429ce373e1a2158199f1162f9c84e8e5a7d0b71a2224f31b64dfd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react-redux@npm:7.1.25":
|
||||
version: 7.1.25
|
||||
resolution: "@types/react-redux@npm:7.1.25"
|
||||
|
Loading…
Reference in New Issue
Block a user