mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-15 09:04:04 +02:00
24 lines
457 B
JavaScript
24 lines
457 B
JavaScript
import { Note } from 'lib/models/note.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 } |