Note locking support

This commit is contained in:
Mo Bitar
2018-03-01 13:07:07 -06:00
parent 3c336de306
commit 538f03aa66
6 changed files with 35 additions and 8 deletions

View File

@@ -283,6 +283,12 @@ angular.module('app')
this.changesMade();
}
this.toggleLockNote = function() {
this.note.setAppDataItem("locked", !this.note.locked);
this.note.setDirty(true);
this.changesMade();
}
this.toggleArchiveNote = function() {
this.note.setAppDataItem("archived", !this.note.archived);
this.note.setDirty(true);

View File

@@ -193,6 +193,10 @@ class Item {
return this.getAppDataItem("archived");
}
get locked() {
return this.getAppDataItem("locked");
}
/*
During sync conflicts, when determing whether to create a duplicate for an item, we can omit keys that have no
meaningful weight and can be ignored. For example, if one component has active = true and another component has active = false,