fix: note comparison in template
This commit is contained in:
@@ -319,9 +319,9 @@ class AccountMenuCtrl extends PureViewCtrl {
|
||||
}
|
||||
|
||||
async openPrivilegesModal() {
|
||||
this.close();
|
||||
const run = () => {
|
||||
this.application!.presentPrivilegesManagementModal();
|
||||
this.close();
|
||||
};
|
||||
const needsPrivilege = await this.application!.privilegesService!.actionRequiresPrivilege(
|
||||
ProtectedAction.ManagePrivileges
|
||||
|
||||
@@ -90,21 +90,18 @@ class RevisionPreviewModalCtrl implements RevisionPreviewScope {
|
||||
|
||||
restore(asCopy: boolean) {
|
||||
const run = async () => {
|
||||
let item;
|
||||
if (asCopy) {
|
||||
const contentCopy = Object.assign({}, this.content);
|
||||
if (contentCopy.title) {
|
||||
contentCopy.title += " (copy)";
|
||||
}
|
||||
item = await this.application.createManagedItem(
|
||||
await this.application.createManagedItem(
|
||||
ContentType.Note,
|
||||
contentCopy,
|
||||
true
|
||||
);
|
||||
} else {
|
||||
const uuid = this.uuid;
|
||||
item = this.application.findItem(uuid)!;
|
||||
this.application.changeAndSaveItem(item.uuid, (mutator) => {
|
||||
this.application.changeAndSaveItem(this.uuid, (mutator) => {
|
||||
mutator.setContent(this.content);
|
||||
}, true, PayloadSource.RemoteActionRetrieved);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
)
|
||||
.note(
|
||||
ng-repeat='note in self.state.renderedNotes track by note.uuid'
|
||||
ng-class="{'selected' : self.activeEditorNote == note}"
|
||||
ng-class="{'selected' : self.activeEditorNote.uuid == note.uuid}"
|
||||
ng-click='self.selectNote(note)'
|
||||
)
|
||||
.note-flags(ng-show='self.noteFlags[note.uuid].length > 0')
|
||||
|
||||
Reference in New Issue
Block a user