1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-04-14 11:18:47 +02:00
Laurent Cozic 729235bf3c bug fix
2017-07-10 21:48:17 +01:00

25 lines
490 B
JavaScript

import { Note } from 'lib/models/note.js'
import { Log } from 'lib/log.js'
class NotesScreenUtils {
static openNoteList(folderId) {
return Note.previews(folderId).then((notes) => {
this.dispatch({
type: 'NOTES_UPDATE_ALL',
notes: notes,
});
this.dispatch({
type: 'Navigation/NAVIGATE',
routeName: 'Notes',
folderId: folderId,
});
}).catch((error) => {
Log.warn('Cannot load notes from ' + folderId, error);
});
}
}
export { NotesScreenUtils }