1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Mobile: Optimising screen rendering to make text input faster

This commit is contained in:
Laurent Cozic
2019-07-12 18:32:08 +01:00
parent 091cbc5355
commit 981c97cca5
2 changed files with 50 additions and 24 deletions

View File

@ -26,7 +26,7 @@ const DialogBox = require('react-native-dialogbox').default;
// default height.
const PADDING_V = 10;
class ScreenHeaderComponent extends Component {
class ScreenHeaderComponent extends React.PureComponent {
constructor() {
super();
@ -311,9 +311,10 @@ class ScreenHeaderComponent extends Component {
}
const titlePickerItems = (mustSelect) => {
const folders = this.props.folders.filter(f => f.id !== Folder.conflictFolderId());
let output = [];
if (mustSelect) output.push({ label: _('Move to notebook...'), value: null });
const folderTree = Folder.buildTree(this.props.folders);
const folderTree = Folder.buildTree(folders);
output = addFolderChildren(folderTree, output, 0);
return output;
}