Skip to content
Snippets Groups Projects
Commit 156338fc authored by Klaus-Dieter Quibeldey-Cirkel's avatar Klaus-Dieter Quibeldey-Cirkel
Browse files

Merge branch '241-fix-active-user-dublication-bug-in-topic-cloud' into 'staging'

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

Closes #241

See merge request arsnova/topic-cloud!143
parents 253337c1 2d2c57a8
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