Merge pull request #3869 from crazyserver/MOBILE-3947

Mobile 3947
main
Dani Palou 2023-11-29 15:48:37 +01:00 committed by GitHub
commit e650c31b11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);