componentManager duplicate-item message

This commit is contained in:
Mo Bitar
2018-12-16 12:43:29 -06:00
parent 1d59fb7c90
commit 31d44af52e
4 changed files with 31 additions and 882 deletions

View File

@@ -678,7 +678,8 @@ angular.module('app')
this.reloadComponentContext = function() {
// componentStack is used by the template to ng-repeat
this.componentStack = componentManager.componentsForArea("editor-stack").sort((a, b) => {
// Careful here. For some reason, sorting by updated_at (or any other property that may always be changing)
// Careful here. For some reason (probably because re-assigning array everytime quickly destroys componentView elements, causing deallocs),
// sorting by updated_at (or any other property that may always be changing)
// causes weird problems with ext communication when changing notes or activating/deactivating in quick succession
return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1;
});