Merge pull request #4158 from dpalou/MOBILE-4649

MOBILE-4649 user-menu: Fix loading forever when no user handlers
main
Alfonso Salces 2024-08-23 13:55:55 +02:00 committed by GitHub
commit 7f1c6b143d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 12 deletions

View File

@ -48,7 +48,6 @@
</ion-label>
</ion-item>
@if (handlers.length + accountHandlers.length > 0) {
<ion-item button *ngFor="let handler of handlers" class="ion-text-wrap" (click)="handlerClicked($event, handler)"
[ngClass]="['core-user-menu-handler', handler.class || '']" [hidden]="handler.hidden"
[attr.aria-label]="handler.title | translate" [detail]="true">
@ -81,16 +80,6 @@
</span>
<ion-spinner slot="end" *ngIf="handler.showBadge && handler.loading" [attr.aria-label]="'core.loading' | translate" />
</ion-item>
} @else {
<ion-item class="ion-text-center">
<ion-label>
<ion-spinner [attr.aria-label]="'core.loading' | translate" />
</ion-label>
</ion-item>
}
<ion-item button (click)="openPreferences($event)" [attr.aria-label]="'core.settings.preferences' | translate" [detail]="true"
class="core-user-menu-preferences core-user-menu-separator">

View File

@ -99,7 +99,7 @@ export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
this.subscription = CoreUserDelegate.getProfileHandlersFor(this.user, CoreUserDelegateContext.USER_MENU)
.subscribe((handlers) => {
if (!handlers.length || !this.user) {
if (!this.user) {
return;
}