bugfix :: wlndowstateChanged 의 옵저버블이 dispatch 되지 않아 noti 쪽이 움직이지 않는 문제 수정.
This commit is contained in:
parent
4287216dd0
commit
5b84d02f7b
@ -209,10 +209,9 @@ export class AppNotificationService {
|
|||||||
(state: any) =>
|
(state: any) =>
|
||||||
state.messenger.sync.room.entities as Dictionary<RoomInfo>
|
state.messenger.sync.room.entities as Dictionary<RoomInfo>
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
this.nativeService.windowStateChanged()
|
|
||||||
),
|
),
|
||||||
tap(([notiOrRes, curRoomInfo, roomList, windowStateChanged]) => {
|
tap(([notiOrRes, curRoomInfo, roomList]) => {
|
||||||
switch (notiOrRes.SSVC_TYPE) {
|
switch (notiOrRes.SSVC_TYPE) {
|
||||||
case SSVC_TYPE_EVENT_SEND_RES:
|
case SSVC_TYPE_EVENT_SEND_RES:
|
||||||
case SSVC_TYPE_EVENT_SEND_NOTI:
|
case SSVC_TYPE_EVENT_SEND_NOTI:
|
||||||
@ -241,14 +240,16 @@ export class AppNotificationService {
|
|||||||
doNoti = false;
|
doNoti = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const windowState = this.nativeService.getWindowState();
|
||||||
|
|
||||||
// 현재 열려 있는 방일경우 노티 안함.
|
// 현재 열려 있는 방일경우 노티 안함.
|
||||||
if (
|
if (
|
||||||
!!curRoomInfo &&
|
!!curRoomInfo &&
|
||||||
!!curRoomInfo.roomSeq &&
|
!!curRoomInfo.roomSeq &&
|
||||||
curRoomInfo.roomSeq === noti.roomSeq &&
|
curRoomInfo.roomSeq === noti.roomSeq &&
|
||||||
!!windowStateChanged &&
|
!!windowState &&
|
||||||
windowStateChanged !== WindowState.Minimized &&
|
windowState !== WindowState.Minimized &&
|
||||||
windowStateChanged !== WindowState.Hidden
|
windowState !== WindowState.Hidden
|
||||||
) {
|
) {
|
||||||
doNoti = false;
|
doNoti = false;
|
||||||
}
|
}
|
||||||
|
@ -227,6 +227,9 @@ export class BrowserNativeService extends NativeService {
|
|||||||
windowMinimize(): void {}
|
windowMinimize(): void {}
|
||||||
|
|
||||||
windowMaximize(): void {}
|
windowMaximize(): void {}
|
||||||
|
getWindowState(): WindowState {
|
||||||
|
return WindowState.Normal;
|
||||||
|
}
|
||||||
|
|
||||||
appExit(): void {}
|
appExit(): void {}
|
||||||
|
|
||||||
|
@ -391,6 +391,22 @@ export class ElectronNativeService implements NativeService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getWindowState(): WindowState {
|
||||||
|
if (!remote.getCurrentWindow().isVisible()) {
|
||||||
|
return WindowState.Hidden;
|
||||||
|
} else if (remote.getCurrentWindow().isMinimized()) {
|
||||||
|
return WindowState.Minimized;
|
||||||
|
} else if (remote.getCurrentWindow().isNormal()) {
|
||||||
|
return WindowState.Normal;
|
||||||
|
} else if (remote.getCurrentWindow().isMaximized()) {
|
||||||
|
return WindowState.Maximized;
|
||||||
|
} else if (remote.getCurrentWindow().isFullScreen()) {
|
||||||
|
return WindowState.FullScreen;
|
||||||
|
} else {
|
||||||
|
return WindowState.Normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
appExit(): void {
|
appExit(): void {
|
||||||
this.ipcRenderer.send(AppChannel.Exit);
|
this.ipcRenderer.send(AppChannel.Exit);
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,7 @@ export abstract class NativeService {
|
|||||||
abstract windowClose(): void;
|
abstract windowClose(): void;
|
||||||
abstract windowMinimize(): void;
|
abstract windowMinimize(): void;
|
||||||
abstract windowMaximize(): void;
|
abstract windowMaximize(): void;
|
||||||
|
abstract getWindowState(): WindowState;
|
||||||
abstract zoomTo(factor: number): Promise<number>;
|
abstract zoomTo(factor: number): Promise<number>;
|
||||||
abstract appExit(): void;
|
abstract appExit(): void;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user