From 8d860997a568395fe24a6cd91891a7d3cdb169bc Mon Sep 17 00:00:00 2001 From: Elblinator <69210919+Elblinator@users.noreply.github.com> Date: Wed, 22 May 2024 13:52:50 +0200 Subject: [PATCH] Hide empty space if three dot menu is not shown (#3590) --- .../participant-list.component.html | 11 ++++++-- .../participant-list.component.ts | 10 +++---- .../scrolling-table-cell.directive.ts | 26 ++++++++++++++++--- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html index c4d0927eb5..61f344a4c5 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html @@ -156,14 +156,21 @@

{{ 'Participants' | translate }}

-
+
diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts index 03cb70978a..be1472e0e7 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts @@ -200,11 +200,7 @@ export class ParticipantListComponent extends BaseMeetingListViewComponent) { + if (this.isHiddenSubscription) { + this.isHiddenSubscription.unsubscribe(); + } + if (typeof isHidden == `boolean`) { + this.isHiddenSubscription = null; + this._isHidden = isHidden; + } else { + isHidden.subscribe(isMobileView => { + this._isHidden = !isMobileView; + }); + } } @Input() @@ -81,6 +92,7 @@ export class ScrollingTableCellDirective implements OnInit, ScrollingTableCellDe private _property = ``; private _labelString = ``; private _isDefault = false; + private isHiddenSubscription: Subscription | null = null; public constructor( public readonly template: TemplateRef, @@ -96,6 +108,12 @@ export class ScrollingTableCellDirective implements OnInit, ScrollingTableCellDe } } + public ngOnDestroy(): void { + if (this.isHiddenSubscription) { + this.isHiddenSubscription.unsubscribe(); + } + } + private render(): void { const { width, minWidth, maxWidth } = this._config; if (width) {