Commit 5089447a authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Limpia widgets de activity al ocultar, añade aviso

Por descuido, no se estaba llamando al método de limpieza de
_CustomLayout, porque se estaba pisando desde la vista detalle de
activity. Corrige este error y además añade un aviso para posibles casos
futuros, que salte cuando se intenta añadir un widget con una clave ya
existente.
parent 4cf0ff1d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -74,6 +74,11 @@ define([

		_addLayoutWidget: function(key, config) {

			if (this._layoutWidgets?.includes(key)) {
				console.error('Tried to add duplicated widget "%s" at component "%s"', key, this.getChannel());
				return;
			}

			this._addWidget(key, config);
			this._layoutWidgets.push(key);
		},
+2 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ define([

		_setOwnCallbacksForEvents: function() {

			this.inherited(arguments);

			this._onEvt('ME_OR_ANCESTOR_HIDDEN', lang.hitch(this, this._onActivityDetailsHidden));
		},