메일 카운트 5분마다 갱신하도록 수정.
This commit is contained in:
parent
23ae97caab
commit
2b4846d865
@ -117,6 +117,8 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||||||
webLinkBadgeMail = 0;
|
webLinkBadgeMail = 0;
|
||||||
webLinkBadgePayment = 0;
|
webLinkBadgePayment = 0;
|
||||||
|
|
||||||
|
webLinkbadgeEmailCountInterval: any;
|
||||||
|
|
||||||
appVersion: string;
|
appVersion: string;
|
||||||
|
|
||||||
WebLinkType = WebLinkType;
|
WebLinkType = WebLinkType;
|
||||||
@ -221,6 +223,10 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||||||
this.zoomSubscription.unsubscribe();
|
this.zoomSubscription.unsubscribe();
|
||||||
this.zoomSubscription = undefined;
|
this.zoomSubscription = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!!this.webLinkbadgeEmailCountInterval) {
|
||||||
|
clearInterval(this.webLinkbadgeEmailCountInterval);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initWebLink(loginRes: LoginResponse): void {
|
initWebLink(loginRes: LoginResponse): void {
|
||||||
@ -262,14 +268,18 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||||||
.replace(/(\(%USER_ID%\))/g, loginId)
|
.replace(/(\(%USER_ID%\))/g, loginId)
|
||||||
.replace(/(\(%USER_PASS%\))/g, loginPw);
|
.replace(/(\(%USER_PASS%\))/g, loginPw);
|
||||||
|
|
||||||
this.daesangApiService
|
if (!this.webLinkbadgeEmailCountInterval) {
|
||||||
.retrieveMailCount(url)
|
this.webLinkbadgeEmailCountInterval = setInterval(() => {
|
||||||
.pipe(
|
this.daesangApiService
|
||||||
take(1),
|
.retrieveMailCount(url)
|
||||||
map(res => (this.webLinkBadgeMail = res.count)),
|
.pipe(
|
||||||
catchError(error => of(this.logger.log(error)))
|
take(1),
|
||||||
)
|
map(res => (this.webLinkBadgeMail = res.count)),
|
||||||
.subscribe();
|
catchError(error => of(this.logger.log(error)))
|
||||||
|
)
|
||||||
|
.subscribe();
|
||||||
|
}, 5 * 60 * 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (urlInfo.webLinkAllowedList.indexOf(WebLinkType.Payment) > -1) {
|
if (urlInfo.webLinkAllowedList.indexOf(WebLinkType.Payment) > -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user