This commit is contained in:
병준 박 2019-11-21 15:16:16 +09:00
commit c7b14abb6d
3 changed files with 18 additions and 4 deletions

View File

@ -339,6 +339,8 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
menuType === 'EDIT_ROOM'
) {
if (
!this.roomInfo ||
!this.roomInfo.roomType ||
this.roomInfo.roomType === RoomType.Mytalk ||
this.roomInfo.roomType === RoomType.Allim ||
this.roomInfo.roomType === RoomType.Bot ||

View File

@ -4,6 +4,6 @@
span {
word-wrap: break-word;
white-space: pre-wrap;
word-break: keep-all;
word-break: break-word;
}
}

View File

@ -26,6 +26,7 @@ import { NGXLogger } from 'ngx-logger';
import { VirtualScrollTreeFlatDataSource } from '@ucap-webmessenger/ui';
import { FlatTreeControl } from '@angular/cdk/tree';
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
enum NodeType {
None = 'None',
@ -116,6 +117,10 @@ export class ExpansionPanelComponent
children: []
};
item.buddyList.sort((a, b) =>
a.name < b.name ? -1 : a.name > b.name ? 1 : 0
);
item.buddyList.forEach(userInfo => {
groupNode.children.push({
nodeType: NodeType.Buddy,
@ -160,6 +165,9 @@ export class ExpansionPanelComponent
@ViewChild('cvsvGroup', { static: false })
cvsvGroup: CdkVirtualScrollViewport;
@ViewChild('cvsvGroup', { read: PerfectScrollbarDirective, static: false })
perfectScrollbar: PerfectScrollbarDirective;
NodeType = NodeType;
profileNodes: GroupNode[] = [];
@ -270,5 +278,9 @@ export class ExpansionPanelComponent
...this.buddyNodes
];
this.dataSource.data = this.rootNodeList;
if (!!this.perfectScrollbar) {
this.perfectScrollbar.scrollToTop();
}
}
}