Merge branch 'master' of http://10.81.13.221:6990/Web/next-ucap-messenger
This commit is contained in:
commit
598818df37
@ -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 ||
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user