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' menuType === 'EDIT_ROOM'
) { ) {
if ( if (
!this.roomInfo ||
!this.roomInfo.roomType ||
this.roomInfo.roomType === RoomType.Mytalk || this.roomInfo.roomType === RoomType.Mytalk ||
this.roomInfo.roomType === RoomType.Allim || this.roomInfo.roomType === RoomType.Allim ||
this.roomInfo.roomType === RoomType.Bot || this.roomInfo.roomType === RoomType.Bot ||

View File

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