MOBILE-4470 user-menu: Fix interval running forever in tablet
In tablet the user-menu-button at the top right was hidden using CSS, but this button has a user tour associated. This meant that the user tour kept looking for the button to be visible forever, checking it every 50ms.main
parent
e145748d93
commit
fcea6c311c
|
@ -1,3 +1,3 @@
|
|||
<core-user-avatar *ngIf="(alwaysShow || isMainScreen) && siteInfo" [site]="siteInfo" class="core-bar-button-image clickable"
|
||||
[linkProfile]="false" (ariaButtonClick)="openUserMenu($event)" [userTour]="userTour"
|
||||
<core-user-avatar *ngIf="(alwaysShow || (isMainScreen && menuPage?.tabsPlacement === 'bottom')) && siteInfo" [site]="siteInfo"
|
||||
class="core-bar-button-image clickable" [linkProfile]="false" (ariaButtonClick)="openUserMenu($event)" [userTour]="userTour"
|
||||
[attr.aria-label]="'core.user.useraccount' | translate" />
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
:host-context(ion-tabs.placement-side ion-toolbar) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:host core-user-avatar {
|
||||
--userpicture-padding: 6px !important;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, Optional } from '@angular/core';
|
||||
import { CoreSiteInfo } from '@classes/sites/unauthenticated-site';
|
||||
import { CoreUserTourDirectiveOptions } from '@directives/user-tour';
|
||||
import { CoreUserToursAlignment, CoreUserToursSide } from '@features/usertours/services/user-tours';
|
||||
|
@ -22,6 +22,7 @@ import { CoreSites } from '@services/sites';
|
|||
import { CoreDomUtils } from '@services/utils/dom';
|
||||
import { CoreMainMenuUserMenuTourComponent } from '../user-menu-tour/user-menu-tour';
|
||||
import { CoreMainMenuUserMenuComponent } from '../user-menu/user-menu';
|
||||
import { CoreMainMenuPage } from '@features/mainmenu/pages/menu/menu';
|
||||
|
||||
/**
|
||||
* Component to display an avatar on the header to open user menu.
|
||||
|
@ -45,10 +46,8 @@ export class CoreMainMenuUserButtonComponent implements OnInit {
|
|||
side: CoreScreen.isMobile ? CoreUserToursSide.Start : CoreUserToursSide.End,
|
||||
};
|
||||
|
||||
constructor(protected routerOutlet: IonRouterOutlet) {
|
||||
const currentSite = CoreSites.getRequiredCurrentSite();
|
||||
|
||||
this.siteInfo = currentSite.getInfo();
|
||||
constructor(protected routerOutlet: IonRouterOutlet, @Optional() protected menuPage: CoreMainMenuPage | null) {
|
||||
this.siteInfo = CoreSites.getCurrentSite()?.getInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue