Fix: update best record for every hour
This commit is contained in:
@@ -16,6 +16,11 @@ class Start {
|
||||
|
||||
// top
|
||||
let backButton = new BackButton( () => {
|
||||
sessionStorageManager.playingAppName = null;
|
||||
sessionStorageManager.playingAppKoreanName = null;
|
||||
sessionStorageManager.record = null;
|
||||
sessionStorageManager.bestRecord = null;
|
||||
|
||||
location.href = '../../web/client/menu_app.html';
|
||||
});
|
||||
|
||||
@@ -26,6 +31,7 @@ class Start {
|
||||
// this.printHowToPlay(appInfoManager.getHowToPlayText(sessionStorageManager.playingAppName));
|
||||
this.loadHowToPlay(sessionStorageManager.playingAppID);
|
||||
this.makeStartButton();
|
||||
|
||||
let today = new Date();
|
||||
let date = DateUtil.getYYYYMMDD(today);
|
||||
this.dbConnectManager.requestPlayerHistory(
|
||||
@@ -71,6 +77,11 @@ class Start {
|
||||
sessionStorageManager.BestRecord = Number(replyJSON["BestRecord"]);
|
||||
let highScoreWithCommas = NumberUtil.numberWithCommas(sessionStorageManager.BestRecord);
|
||||
screenBottom.printBottomLeftText("오늘의 최고 기록 : " + highScoreWithCommas);
|
||||
},
|
||||
replyJSON => { // no data
|
||||
sessionStorageManager.BestRecord = 0;
|
||||
let highScoreWithCommas = NumberUtil.numberWithCommas(sessionStorageManager.BestRecord);
|
||||
screenBottom.printBottomLeftText("오늘의 최고 기록 : " + highScoreWithCommas);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user