This commit is contained in:
Mo Bitar
2017-11-10 11:16:09 -06:00
parent d9b20c03a8
commit 6f2c8f1970
3 changed files with 5 additions and 9 deletions

View File

@@ -28,10 +28,6 @@ angular.module('app.frontend')
this.componentManager = componentManager;
this.componentStack = [];
$rootScope.$on("theme-changed", function(){
this.postThemeToExternalEditor();
}.bind(this))
$rootScope.$on("sync:taking-too-long", function(){
this.syncTakingTooLong = true;
}.bind(this));

View File

@@ -1,7 +1,7 @@
class ComponentManager {
/* This domain will be used to save context item client data */
let ClientDataDomain = "org.standardnotes.sn.components";
/* This domain will be used to save context item client data */
let ClientDataDomain = "org.standardnotes.sn.components";
class ComponentManager {
constructor($rootScope, modelManager, syncManager, themeManager, $timeout, $compile) {
this.$compile = $compile;
@@ -121,7 +121,7 @@ class ComponentManager {
jsonForItem(item, component) {
var params = {uuid: item.uuid, content_type: item.content_type, created_at: item.created_at, updated_at: item.updated_at, deleted: item.deleted};
params.content = item.createContentJSONFromProperties();
params.clientData = item.getDomainDataItem(component.url, ClientDataDomain);
params.clientData = item.getDomainDataItem(component.url, ClientDataDomain) || {};
this.removePrivatePropertiesFromResponseItems([params]);
return params;
}

View File

@@ -48,7 +48,7 @@ class MigrationManager {
}
for(let editor of editors) {
editor.setItemToBeDeleted();
this.modelManager.setItemToBeDeleted(editor);
}
this.syncManager.sync();