next-ucap-messenger/projects/ucap-webmessenger-app/src/app/layouts/chat/components/left-sidenav/group.component.ts

29 lines
745 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { Store, select } from '@ngrx/store';
import { ucapAnimations } from '@ucap-webmessenger/ui';
import { UserInfo } from '@ucap-webmessenger/protocol-sync';
import * as AppStore from '@app/store';
@Component({
selector: 'app-layout-chat-left-sidenav-group',
templateUrl: './group.component.html',
styleUrls: ['./group.component.scss'],
animations: ucapAnimations
})
export class GroupComponent implements OnInit {
buddyInfoList$: Observable<UserInfo[]>;
constructor(private store: Store<any>) {}
ngOnInit() {
this.buddyInfoList$ = this.store.pipe(
select(AppStore.MessengerSelector.SyncSelector.buddyInfoList)
);
}
}