joplin/ReactNativeClient/lib/folders-screen-utils.js

22 lines
369 B
JavaScript
Raw Normal View History

2017-12-14 18:12:14 +00:00
const Folder = require('lib/models/Folder.js');
2017-07-15 15:54:19 +00:00
class FoldersScreenUtils {
static async refreshFolders() {
let initialFolders = await Folder.all({
includeConflictFolder: true,
order: [{
by: "title",
dir: "asc"
}]
});
2017-10-07 22:17:10 +00:00
2017-07-15 15:54:19 +00:00
this.dispatch({
2017-11-08 21:22:24 +00:00
type: 'FOLDER_UPDATE_ALL',
items: initialFolders,
2017-07-15 15:54:19 +00:00
});
}
}
module.exports = { FoldersScreenUtils };