MOBILE-4649 user-menu: Fix loading forever when no user handlers
This commit is contained in:
		
							parent
							
								
									3fdc860a82
								
							
						
					
					
						commit
						e834d99df7
					
				@ -48,7 +48,6 @@
 | 
				
			|||||||
                </ion-label>
 | 
					                </ion-label>
 | 
				
			||||||
            </ion-item>
 | 
					            </ion-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            @if (handlers.length + accountHandlers.length > 0) {
 | 
					 | 
				
			||||||
            <ion-item button *ngFor="let handler of handlers" class="ion-text-wrap" (click)="handlerClicked($event, handler)"
 | 
					            <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"
 | 
					                [ngClass]="['core-user-menu-handler', handler.class || '']" [hidden]="handler.hidden"
 | 
				
			||||||
                [attr.aria-label]="handler.title | translate" [detail]="true">
 | 
					                [attr.aria-label]="handler.title | translate" [detail]="true">
 | 
				
			||||||
@ -81,16 +80,6 @@
 | 
				
			|||||||
                </span>
 | 
					                </span>
 | 
				
			||||||
                <ion-spinner slot="end" *ngIf="handler.showBadge && handler.loading" [attr.aria-label]="'core.loading' | translate" />
 | 
					                <ion-spinner slot="end" *ngIf="handler.showBadge && handler.loading" [attr.aria-label]="'core.loading' | translate" />
 | 
				
			||||||
            </ion-item>
 | 
					            </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"
 | 
					            <ion-item button (click)="openPreferences($event)" [attr.aria-label]="'core.settings.preferences' | translate" [detail]="true"
 | 
				
			||||||
                class="core-user-menu-preferences core-user-menu-separator">
 | 
					                class="core-user-menu-preferences core-user-menu-separator">
 | 
				
			||||||
 | 
				
			|||||||
@ -99,7 +99,7 @@ export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        this.subscription = CoreUserDelegate.getProfileHandlersFor(this.user, CoreUserDelegateContext.USER_MENU)
 | 
					        this.subscription = CoreUserDelegate.getProfileHandlersFor(this.user, CoreUserDelegateContext.USER_MENU)
 | 
				
			||||||
            .subscribe((handlers) => {
 | 
					            .subscribe((handlers) => {
 | 
				
			||||||
                if (!handlers.length || !this.user) {
 | 
					                if (!this.user) {
 | 
				
			||||||
                    return;
 | 
					                    return;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user