1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

RN: Better UI to handle conflicts

This commit is contained in:
Laurent Cozic
2017-07-15 16:54:19 +01:00
parent dde0da571e
commit aabc58224a
4 changed files with 33 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ import { AppNav } from 'lib/components/app-nav.js'
import { Logger } from 'lib/logger.js'
import { Note } from 'lib/models/note.js'
import { Folder } from 'lib/models/folder.js'
import { FoldersScreenUtils } from 'lib/components/screens/folders-utils.js';
import { Resource } from 'lib/models/resource.js'
import { Tag } from 'lib/models/tag.js'
import { NoteTag } from 'lib/models/note-tag.js'
@@ -267,6 +268,7 @@ async function initialize(dispatch, backButtonHandler) {
BaseModel.dispatch = dispatch;
NotesScreenUtils.dispatch = dispatch;
FoldersScreenUtils.dispatch = dispatch;
BaseModel.db_ = db;
BaseItem.loadClass('Note', Note);
@@ -287,6 +289,8 @@ async function initialize(dispatch, backButtonHandler) {
// await db.exec('DELETE FROM note_tags');
// await db.exec('DELETE FROM resources');
// await db.exec('DELETE FROM deleted_items');
// await db.exec('UPDATE notes SET is_conflict = 1 where id like "546f%"');
}
reg.logger().info('Database is ready.');
@@ -294,12 +298,8 @@ async function initialize(dispatch, backButtonHandler) {
await Setting.load();
reg.logger().info('Loading folders...');
let initialFolders = await Folder.all();
dispatch({
type: 'FOLDERS_UPDATE_ALL',
folders: initialFolders,
});
await FoldersScreenUtils.refreshFolders();
dispatch({
type: 'APPLICATION_LOADING_DONE',