Fix gamelog notify being triggered from old logs being removed

This commit is contained in:
Natsumi
2021-01-20 01:51:12 +13:00
parent 9058da08b0
commit af2897947e

View File

@@ -4639,7 +4639,7 @@ speechSynthesis.getVoices();
$app.data.gameLogTable = {
data: [],
lastRunLength: 0,
lastEntryDate: '',
filters: [
{
prop: 'type',
@@ -4683,10 +4683,13 @@ speechSynthesis.getVoices();
if (API.isLoggedIn === true) {
await this.updateGameLog();
this.sweepGameLog();
if (this.gameLogTable.data.length !== this.gameLogTable.lastRunLength) {
this.notifyMenu('gameLog');
var length = this.gameLogTable.data.length;
if (length > 0) {
if (this.gameLogTable.data[length - 1].created_at !== this.gameLogTable.lastEntryDate) {
this.notifyMenu('gameLog');
}
this.gameLogTable.lastEntryDate = this.gameLogTable.data[length - 1].created_at;
}
this.gameLogTable.lastRunLength = this.gameLogTable.data.length;
this.updateSharedFeed();
}
} catch (err) {