You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Mobile: Fixed issue that could slow down app when displaying large list of notes
This commit is contained in:
@@ -100,15 +100,15 @@ class NotesScreenComponent extends BaseScreenComponent {
|
||||
AppState.removeEventListener('change', this.onAppStateChange_);
|
||||
}
|
||||
|
||||
async UNSAFE_componentWillReceiveProps(newProps) {
|
||||
if (newProps.notesOrder !== this.props.notesOrder ||
|
||||
newProps.selectedFolderId != this.props.selectedFolderId ||
|
||||
newProps.selectedTagId != this.props.selectedTagId ||
|
||||
newProps.selectedSmartFilterId != this.props.selectedSmartFilterId ||
|
||||
newProps.notesParentType != this.props.notesParentType) {
|
||||
await this.refreshNotes(newProps);
|
||||
async componentDidUpdate(prevProps) {
|
||||
if (prevProps.notesOrder !== this.props.notesOrder ||
|
||||
prevProps.selectedFolderId != this.props.selectedFolderId ||
|
||||
prevProps.selectedTagId != this.props.selectedTagId ||
|
||||
prevProps.selectedSmartFilterId != this.props.selectedSmartFilterId ||
|
||||
prevProps.notesParentType != this.props.notesParentType) {
|
||||
await this.refreshNotes(this.props);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async refreshNotes(props = null) {
|
||||
if (props === null) props = this.props;
|
||||
@@ -144,6 +144,8 @@ class NotesScreenComponent extends BaseScreenComponent {
|
||||
notes: notes,
|
||||
notesSource: source,
|
||||
});
|
||||
|
||||
console.info('Done', Date.now() - startTime);
|
||||
}
|
||||
|
||||
deleteFolder_onPress(folderId) {
|
||||
|
||||
Reference in New Issue
Block a user