mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-8959] Introduce new takeUntilDestroyed
operator where possible (#10388)
This commit is contained in:
committed by
GitHub
parent
3f6b60760f
commit
3078387325
@@ -15,10 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, Input, OnDestroy, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, Input, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { MatMenuModule, MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material/menu';
|
||||
import { IdentityUserModel } from '../auth/models/identity-user.model';
|
||||
import { Subject } from 'rxjs';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FullNamePipe, InitialUsernamePipe } from '../pipes';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
@@ -33,7 +32,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
styleUrls: ['./identity-user-info.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class IdentityUserInfoComponent implements OnDestroy {
|
||||
export class IdentityUserInfoComponent {
|
||||
@ViewChild(MatMenuTrigger) trigger: MatMenuTrigger;
|
||||
|
||||
/** Is the user logged in */
|
||||
@@ -67,13 +66,6 @@ export class IdentityUserInfoComponent implements OnDestroy {
|
||||
@Input()
|
||||
namePosition: 'right' | 'left' = 'right';
|
||||
|
||||
private destroy$ = new Subject();
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.destroy$.next(true);
|
||||
this.destroy$.complete();
|
||||
}
|
||||
|
||||
onKeyPress(event: KeyboardEvent) {
|
||||
this.closeUserModal(event);
|
||||
}
|
||||
|
Reference in New Issue
Block a user