1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Chore: Mobile: Fix "MenuContext is deprecated" warning (#9330)

This commit is contained in:
Henry Heino 2023-11-17 03:43:01 -08:00 committed by GitHub
parent e186fe8936
commit 9b9762f940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -45,9 +45,6 @@ LogBox.ignoreLogs([
// Apparently it can be safely ignored: // Apparently it can be safely ignored:
// https://github.com/react-native-webview/react-native-webview/issues/124 // https://github.com/react-native-webview/react-native-webview/issues/124
'Did not receive response to shouldStartLoad in time, defaulting to YES', 'Did not receive response to shouldStartLoad in time, defaulting to YES',
// Emitted by react-native-popup-menu
'MenuContext is deprecated and it might be removed in future releases, use MenuProvider instead.',
]); ]);
AppRegistry.registerComponent('Joplin', () => Root); AppRegistry.registerComponent('Joplin', () => Root);

View File

@ -66,7 +66,7 @@ const { SearchScreen } = require('./components/screens/search.js');
const { OneDriveLoginScreen } = require('./components/screens/onedrive-login.js'); const { OneDriveLoginScreen } = require('./components/screens/onedrive-login.js');
import EncryptionConfigScreen from './components/screens/encryption-config'; import EncryptionConfigScreen from './components/screens/encryption-config';
const { DropboxLoginScreen } = require('./components/screens/dropbox-login.js'); const { DropboxLoginScreen } = require('./components/screens/dropbox-login.js');
const { MenuContext } = require('react-native-popup-menu'); import { MenuProvider } from 'react-native-popup-menu';
import SideMenu from './components/SideMenu'; import SideMenu from './components/SideMenu';
import SideMenuContent from './components/side-menu-content'; import SideMenuContent from './components/side-menu-content';
const { SideMenuContentNote } = require('./components/side-menu-content-note.js'); const { SideMenuContentNote } = require('./components/side-menu-content-note.js');
@ -1088,7 +1088,7 @@ class AppComponent extends React.Component {
}} }}
> >
<StatusBar barStyle={statusBarStyle} /> <StatusBar barStyle={statusBarStyle} />
<MenuContext style={{ flex: 1 }}> <MenuProvider style={{ flex: 1 }}>
<SafeAreaView style={{ flex: 0, backgroundColor: theme.backgroundColor2 }}/> <SafeAreaView style={{ flex: 0, backgroundColor: theme.backgroundColor2 }}/>
<SafeAreaView style={{ flex: 1 }}> <SafeAreaView style={{ flex: 1 }}>
<View style={{ flex: 1, backgroundColor: theme.backgroundColor }}> <View style={{ flex: 1, backgroundColor: theme.backgroundColor }}>
@ -1101,7 +1101,7 @@ class AppComponent extends React.Component {
sensorInfo={this.state.sensorInfo} sensorInfo={this.state.sensorInfo}
/> } /> }
</SafeAreaView> </SafeAreaView>
</MenuContext> </MenuProvider>
</SideMenu> </SideMenu>
</View> </View>
); );