unreadcount 소스 개선.
This commit is contained in:
parent
d219226aa3
commit
0872d2eb88
|
@ -1,4 +1,11 @@
|
|||
import { map, tap, take, catchError, debounce } from 'rxjs/operators';
|
||||
import {
|
||||
map,
|
||||
tap,
|
||||
take,
|
||||
catchError,
|
||||
debounce,
|
||||
withLatestFrom
|
||||
} from 'rxjs/operators';
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
|
@ -18,30 +25,15 @@ import * as EventStore from '@app/store/messenger/event';
|
|||
import * as MessageStore from '@app/store/messenger/message';
|
||||
import * as StatusStore from '@app/store/messenger/status';
|
||||
import * as SettingsStore from '@app/store/messenger/settings';
|
||||
import {
|
||||
Observable,
|
||||
Subscription,
|
||||
of,
|
||||
timer,
|
||||
EMPTY,
|
||||
combineLatest
|
||||
} from 'rxjs';
|
||||
import {
|
||||
UCAP_NATIVE_SERVICE,
|
||||
NativeService,
|
||||
WindowState
|
||||
} from '@ucap-webmessenger/native';
|
||||
import { Observable, Subscription, of, timer, EMPTY } from 'rxjs';
|
||||
import { UCAP_NATIVE_SERVICE, NativeService } from '@ucap-webmessenger/native';
|
||||
|
||||
import { StatusProtocolService } from '@ucap-webmessenger/protocol-status';
|
||||
import { StatusType, StatusCode } from '@ucap-webmessenger/core';
|
||||
import {
|
||||
DialogService,
|
||||
ConfirmDialogComponent,
|
||||
ConfirmDialogResult,
|
||||
AlertDialogComponent,
|
||||
AlertDialogResult,
|
||||
AlertDialogData,
|
||||
ConfirmDialogData
|
||||
AlertDialogData
|
||||
} from '@ucap-webmessenger/ui';
|
||||
import {
|
||||
ProfileDialogComponent,
|
||||
|
@ -110,7 +102,6 @@ export class MainPageComponent implements OnInit, OnDestroy {
|
|||
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||||
private store: Store<any>,
|
||||
private ngZone: NgZone,
|
||||
private statusProtocolService: StatusProtocolService,
|
||||
private daesangProtocolService: DaesangProtocolService,
|
||||
private conferenceService: ConferenceService,
|
||||
private callService: CallService,
|
||||
|
@ -168,17 +159,20 @@ export class MainPageComponent implements OnInit, OnDestroy {
|
|||
})
|
||||
);
|
||||
|
||||
this.windowFocusChangedSubscription = combineLatest([
|
||||
this.nativeService.windowFocusChanged(),
|
||||
this.store.pipe(select(AppStore.MessengerSelector.RoomSelector.roomInfo)),
|
||||
this.store.pipe(
|
||||
select(AppStore.MessengerSelector.SettingsSelector.gnbMenuIndex)
|
||||
),
|
||||
this.store.pipe(
|
||||
select(AppStore.MessengerSelector.EventSelector.selectAllInfoList)
|
||||
)
|
||||
])
|
||||
this.windowFocusChangedSubscription = this.nativeService
|
||||
.windowFocusChanged()
|
||||
.pipe(
|
||||
withLatestFrom(
|
||||
this.store.pipe(
|
||||
select(AppStore.MessengerSelector.RoomSelector.roomInfo)
|
||||
),
|
||||
this.store.pipe(
|
||||
select(AppStore.MessengerSelector.SettingsSelector.gnbMenuIndex)
|
||||
),
|
||||
this.store.pipe(
|
||||
select(AppStore.MessengerSelector.EventSelector.selectAllInfoList)
|
||||
)
|
||||
),
|
||||
map(([windowFocusState, roomInfo, gnbMenuIndex, eventList]) => {
|
||||
if (windowFocusState === ElectronBrowserWindowChannel.Focus) {
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue
Block a user