You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Cache note list
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux'
|
||||
import { NotesScreen } from 'lib/components/screens/notes.js';
|
||||
import { View } from 'react-native';
|
||||
import { _ } from 'lib/locale.js';
|
||||
|
||||
@ -9,11 +10,19 @@ class AppNavComponent extends Component {
|
||||
if (!this.props.route) throw new Error('Route must not be null');
|
||||
|
||||
let route = this.props.route;
|
||||
let Screen = this.props.screens[route.routeName].screen;
|
||||
let Screen = null;
|
||||
let notesScreenVisible = false;
|
||||
|
||||
if (route.routeName == 'Notes') {
|
||||
notesScreenVisible = true;
|
||||
} else {
|
||||
Screen = this.props.screens[route.routeName].screen;
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={{ flex: 1 }}>
|
||||
<Screen navigation={{ state: route }} />
|
||||
<NotesScreen visible={notesScreenVisible} navigation={{ state: route }} />
|
||||
{ !notesScreenVisible && <Screen navigation={{ state: route }} /> }
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user