bugfix 대메뉴간 빠르게 이동시 렉걸리는 문제 수정.
This commit is contained in:
parent
3da6832465
commit
ecb33fe602
|
@ -1,7 +1,7 @@
|
||||||
import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
|
import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
import { ucapAnimations } from '@ucap-webmessenger/ui';
|
import { ucapAnimations } from '@ucap-webmessenger/ui';
|
||||||
import { Observable, Subscribable, Subscription } from 'rxjs';
|
import { Observable, Subscribable, Subscription, timer } from 'rxjs';
|
||||||
import { Store, select } from '@ngrx/store';
|
import { Store, select } from '@ngrx/store';
|
||||||
|
|
||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
|
@ -9,7 +9,7 @@ import * as MessageStore from '@app/store/messenger/message';
|
||||||
import * as SettingsStore from '@app/store/messenger/settings';
|
import * as SettingsStore from '@app/store/messenger/settings';
|
||||||
import { MatTabChangeEvent } from '@angular/material/tabs';
|
import { MatTabChangeEvent } from '@angular/material/tabs';
|
||||||
import { MainMenu } from '@app/types';
|
import { MainMenu } from '@app/types';
|
||||||
import { tap, map } from 'rxjs/operators';
|
import { tap, map, debounce } from 'rxjs/operators';
|
||||||
import { UCAP_NATIVE_SERVICE, NativeService } from '@ucap-webmessenger/native';
|
import { UCAP_NATIVE_SERVICE, NativeService } from '@ucap-webmessenger/native';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -69,6 +69,7 @@ export class LeftNaviComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
this.gnbMenuIndexSubscription = this.store
|
this.gnbMenuIndexSubscription = this.store
|
||||||
.pipe(select(AppStore.MessengerSelector.SettingsSelector.gnbMenuIndex))
|
.pipe(select(AppStore.MessengerSelector.SettingsSelector.gnbMenuIndex))
|
||||||
|
.pipe(debounce(() => timer(300)))
|
||||||
.subscribe(index => {
|
.subscribe(index => {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case MainMenu.Group:
|
case MainMenu.Group:
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
></app-layout-messenger-intro>
|
></app-layout-messenger-intro>
|
||||||
|
|
||||||
<app-layout-messenger-messages
|
<app-layout-messenger-messages
|
||||||
*ngIf="
|
*ngIf="!!this.selectedChat"
|
||||||
!!this.selectedChat &&
|
|
||||||
(this.gnbMenuIndex$ | async) !== MainMenu.Organization
|
|
||||||
"
|
|
||||||
(openProfile)="onClickOpenProfile($event)"
|
(openProfile)="onClickOpenProfile($event)"
|
||||||
(closeRightDrawer)="onCloseRightDrawer()"
|
(closeRightDrawer)="onCloseRightDrawer()"
|
||||||
(sendCall)="onClickSendClickToCall($event)"
|
(sendCall)="onClickSendClickToCall($event)"
|
||||||
|
[style.display]="
|
||||||
|
MainMenu.Organization !== (this.gnbMenuIndex$ | async) ? 'flex' : 'none'
|
||||||
|
"
|
||||||
></app-layout-messenger-messages>
|
></app-layout-messenger-messages>
|
||||||
<!-- 아래와 같이 display 효과를 쓰려면 block 대산 flex 사용. (화면 전환이 매끄럽지만 스크롤이 그대로인 문제 있음.) -->
|
<!-- 아래와 같이 display 효과를 쓰려면 block 대산 flex 사용. (화면 전환이 매끄럽지만 스크롤이 그대로인 문제 있음.) -->
|
||||||
<app-layout-messenger-organization
|
<app-layout-messenger-organization
|
||||||
|
|
Loading…
Reference in New Issue
Block a user