2018-03-09 20:59:12 +00:00
|
|
|
const Folder = require('lib/models/Folder.js');
|
2017-07-15 16:54:19 +01:00
|
|
|
|
|
|
|
class FoldersScreenUtils {
|
2018-03-09 20:59:12 +00:00
|
|
|
|
2017-07-15 16:54:19 +01:00
|
|
|
static async refreshFolders() {
|
|
|
|
let initialFolders = await Folder.all({ includeConflictFolder: true });
|
2017-10-07 23:17:10 +01:00
|
|
|
|
2017-07-15 16:54:19 +01:00
|
|
|
this.dispatch({
|
2018-03-09 20:59:12 +00:00
|
|
|
type: 'FOLDER_UPDATE_ALL',
|
2017-12-14 17:58:10 +00:00
|
|
|
items: initialFolders,
|
2017-07-15 16:54:19 +01:00
|
|
|
});
|
|
|
|
}
|
2018-03-09 20:59:12 +00:00
|
|
|
|
2017-07-15 16:54:19 +01:00
|
|
|
}
|
|
|
|
|
2018-03-09 20:59:12 +00:00
|
|
|
module.exports = { FoldersScreenUtils };
|