MOBILE-3947 chore: Remove EventEmitter observer deprecation

main
Pau Ferrer Ocaña 2023-11-29 13:47:09 +01:00
parent 2d141bc104
commit d72e8d4d12
5 changed files with 6 additions and 6 deletions

View File

@ -73,7 +73,7 @@ export class CoreContextMenuItemComponent implements OnInit, OnDestroy, OnChange
ngOnInit(): void {
// Initialize values.
this.priority = this.priority || 1;
this.hasAction = !!this.action && this.action.observers.length > 0;
this.hasAction = !!this.action && this.action.observed;
this.ariaAction = this.ariaAction || this.content;
if (this.hasAction) {

View File

@ -61,7 +61,7 @@ export class CoreContextMenuPopoverComponent {
item.toggle = !item.toggle;
}
if (!!item.action && item.action.observers.length > 0) {
if (!!item.action && item.action.observed) {
event.preventDefault();
event.stopPropagation();
@ -74,7 +74,7 @@ export class CoreContextMenuPopoverComponent {
}
item.action.emit(() => this.closeMenu(item));
} else if (item.closeOnClick && (item.href || (!!item.onClosed && item.onClosed.observers.length > 0))) {
} else if (item.closeOnClick && (item.href || (!!item.onClosed && item.onClosed.observed))) {
this.closeMenu(item);
}

View File

@ -119,7 +119,7 @@ export class CoreLocalFileComponent implements OnInit {
e.preventDefault();
e.stopPropagation();
if (!isOpenButton && CoreUtils.isTrueOrOne(this.overrideClick) && this.onClick.observers.length) {
if (!isOpenButton && CoreUtils.isTrueOrOne(this.overrideClick) && this.onClick.observed) {
this.onClick.emit();
return;

View File

@ -306,7 +306,7 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec
return;
}
if (this.onClick.observers.length > 0) {
if (this.onClick.observed) {
this.onClick.emit();
return;

View File

@ -54,7 +54,7 @@ export class CoreSupressEventsDirective implements OnInit {
* Initialize event listeners.
*/
ngOnInit(): void {
if (this.onClick.observers.length == 0) {
if (!this.onClick.observed) {
CoreLogger.getInstance('CoreSupressEventsDirective')
.error('No onClick output was defined causing this directive to fail', this.element);