Skip to content
Snippets Groups Projects
Commit 2d2c57a8 authored by Lukas Haase's avatar Lukas Haase
Browse files

fix dublication error, when selecting param alwaysshowinheader do not show...

fix dublication error, when selecting param alwaysshowinheader do not show in-component user counter
parent 253337c1
No related merge requests found
<div class="activityIcon" *ngIf="deviceType&&deviceType==='desktop'" [ngStyle]="{
<div class="activityIcon" *ngIf="showByComponent" [ngStyle]="{
'left':left+'px',
'top':top+'px'
}" #divElement>
......
......@@ -22,6 +22,7 @@ export class ActiveUserComponent implements OnInit,OnDestroy{
onDestroyListener: (() => void)[]=[];
onValueChangeListener: ((user: number) => void)[]=[];
deviceType;
showByComponent: boolean;
constructor(
private activeUserService: ActiveUserService,
......@@ -32,9 +33,12 @@ export class ActiveUserComponent implements OnInit,OnDestroy{
ngOnInit(): void{
if(this.deviceType&&(this.deviceType==='mobile'||this.alwaysShowInHeader)){
this.showByComponent=false;
this.headerService.toggleCurrentUserActivity(true);
this.onDestroyListener.push(()=>this.headerService.toggleCurrentUserActivity(false));
this.onValueChangeListener.push(num=>this.headerService.setCurrentUserActivity(num));
} else{
this.showByComponent=true;
}
this.onDestroyListener.push(
this.activeUserService.observeUserActivity(this.room,user=>{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment