diff --git a/app/assets/javascripts/app/controllers/editor.js b/app/assets/javascripts/app/controllers/editor.js index d2f8766b8..5fcb72b79 100644 --- a/app/assets/javascripts/app/controllers/editor.js +++ b/app/assets/javascripts/app/controllers/editor.js @@ -42,7 +42,18 @@ angular.module('app') modelManager.addItemSyncObserver("component-manager", "Note", (allItems, validItems, deletedItems, source) => { if(!this.note) { return; } - if(!ModelManager.isMappingSourceRetrieved(source)) {return;} + + // Before checking if isMappingSourceRetrieved, we check if this item was deleted via a local source, + // such as alternating uuids during sign in. Otherwise, we only want to make interface updates if it's a + // remote retrieved source. + if(this.note.deleted) { + $rootScope.notifyDelete(); + return; + } + + if(!ModelManager.isMappingSourceRetrieved(source)) { + return; + } var matchingNote = allItems.find((item) => { return item.uuid == this.note.uuid; @@ -52,12 +63,8 @@ angular.module('app') return; } - if(matchingNote.deleted) { - $rootScope.notifyDelete(); - } else { - // Update tags - this.loadTagsString(); - } + // Update tags + this.loadTagsString(); }); this.noteDidChange = function(note, oldNote) {