This commit is contained in:
pypy
2020-11-07 21:11:14 +09:00
parent c678f07d14
commit 999b718b46
+12 -7
View File
@@ -4508,7 +4508,10 @@ import webApiService from './service/webapi.js';
}; };
$app.methods.updateGameLog = async function () { $app.methods.updateGameLog = async function () {
var currentUser = API.currentUser.username; var {
displayName: currentUserDisplayName,
username: currentUserName
} = API.currentUser;
for (var [fileName, dt, type, ...args] of await LogWatcher.Get()) { for (var [fileName, dt, type, ...args] of await LogWatcher.Get()) {
var gameLogContext = gameLogContextMap.get(fileName); var gameLogContext = gameLogContextMap.get(fileName);
@@ -4529,10 +4532,6 @@ import webApiService from './service/webapi.js';
var gameLogTableData = null; var gameLogTableData = null;
if (API.currentUser.displayName === args[0]) {
continue;
}
switch (type) { switch (type) {
case 'auth': case 'auth':
gameLogContext.loginProvider = args[0]; gameLogContext.loginProvider = args[0];
@@ -4546,7 +4545,7 @@ import webApiService from './service/webapi.js';
case 'location': case 'location':
var location = args[0]; var location = args[0];
gameLogContext.location = location; gameLogContext.location = location;
if (gameLogContext.loginUser === currentUser) { if (gameLogContext.loginUser === currentUserName) {
this.lastLocation = location; this.lastLocation = location;
} }
break; break;
@@ -4562,6 +4561,9 @@ import webApiService from './service/webapi.js';
case 'player-joined': case 'player-joined':
var userDisplayName = args[0]; var userDisplayName = args[0];
if (currentUserDisplayName === userDisplayName) {
continue;
}
gameLogTableData = { gameLogTableData = {
created_at: dt, created_at: dt,
type: 'OnPlayerJoined', type: 'OnPlayerJoined',
@@ -4571,6 +4573,9 @@ import webApiService from './service/webapi.js';
case 'player-left': case 'player-left':
var userDisplayName = args[0]; var userDisplayName = args[0];
if (currentUserDisplayName === userDisplayName) {
continue;
}
gameLogTableData = { gameLogTableData = {
created_at: dt, created_at: dt,
type: 'OnPlayerLeft', type: 'OnPlayerLeft',
@@ -4589,7 +4594,7 @@ import webApiService from './service/webapi.js';
} }
if (gameLogTableData !== null && if (gameLogTableData !== null &&
gameLogContext.loginUser === currentUser) { gameLogContext.loginUser === currentUserName) {
this.gameLogTable.data.push(gameLogTableData); this.gameLogTable.data.push(gameLogTableData);
} }
} }