mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
improve editor performance
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
simpleDialogEvent,
|
||||
TEMPLATE_TRASH,
|
||||
} from '../DialogManager';
|
||||
import {openEditorAnimation} from '../../utils/animations';
|
||||
|
||||
const w = Dimensions.get('window').width;
|
||||
const h = Dimensions.get('window').height;
|
||||
@@ -116,14 +117,15 @@ export default class NoteItem extends React.Component {
|
||||
onPress={() => {
|
||||
if (item.locked) {
|
||||
eSendEvent(eOpenVaultDialog, {unlock: true, i: item});
|
||||
return;
|
||||
}
|
||||
if (DDS.isTab) {
|
||||
eSendEvent(eOnLoadNote, item);
|
||||
} else if (isTrash) {
|
||||
simpleDialogEvent(TEMPLATE_TRASH(item.type));
|
||||
} else {
|
||||
DDS.isTab
|
||||
? eSendEvent(eOnLoadNote, item)
|
||||
: isTrash
|
||||
? simpleDialogEvent(TEMPLATE_TRASH(item.type))
|
||||
: NavigationService.navigate('Editor', {
|
||||
note: item,
|
||||
});
|
||||
eSendEvent(eOnLoadNote, item);
|
||||
openEditorAnimation();
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user