mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 14:46:04 +02:00
Fix gameLog spam
This commit is contained in:
+15
-11
@@ -5683,9 +5683,6 @@ speechSynthesis.getVoices();
|
|||||||
if (ctx.state === 'online') {
|
if (ctx.state === 'online') {
|
||||||
var ts = Date.now();
|
var ts = Date.now();
|
||||||
var time = ts - $location_at;
|
var time = ts - $location_at;
|
||||||
if (location === 'offline') {
|
|
||||||
location = '';
|
|
||||||
}
|
|
||||||
var worldName = await this.getWorldName(location);
|
var worldName = await this.getWorldName(location);
|
||||||
var feed = {
|
var feed = {
|
||||||
created_at: new Date().toJSON(),
|
created_at: new Date().toJSON(),
|
||||||
@@ -5768,6 +5765,7 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.methods.getWorldName = async function (location) {
|
$app.methods.getWorldName = async function (location) {
|
||||||
var worldName = '';
|
var worldName = '';
|
||||||
|
if (location !== 'offline') {
|
||||||
try {
|
try {
|
||||||
var L = API.parseLocation(location);
|
var L = API.parseLocation(location);
|
||||||
if (L.worldId) {
|
if (L.worldId) {
|
||||||
@@ -5778,6 +5776,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return worldName;
|
return worldName;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -7172,7 +7171,7 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
this.friendLogTable.data.push(friendLogHistory);
|
this.friendLogTable.data.push(friendLogHistory);
|
||||||
database.addFriendLogHistory(friendLogHistory);
|
database.addFriendLogHistory(friendLogHistory);
|
||||||
}
|
|
||||||
var friendLogCurrent = {
|
var friendLogCurrent = {
|
||||||
userId: id,
|
userId: id,
|
||||||
displayName: ctx.displayName,
|
displayName: ctx.displayName,
|
||||||
@@ -7180,6 +7179,7 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
this.friendLog.set(id, friendLogCurrent);
|
this.friendLog.set(id, friendLogCurrent);
|
||||||
database.setFriendLogCurrent(friendLogCurrent);
|
database.setFriendLogCurrent(friendLogCurrent);
|
||||||
|
}
|
||||||
this.notifyMenu('friendLog');
|
this.notifyMenu('friendLog');
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -7239,6 +7239,13 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
this.friendLogTable.data.push(friendLogHistory);
|
this.friendLogTable.data.push(friendLogHistory);
|
||||||
database.addFriendLogHistory(friendLogHistory);
|
database.addFriendLogHistory(friendLogHistory);
|
||||||
|
var friendLogCurrent = {
|
||||||
|
userId: ref.id,
|
||||||
|
displayName: ref.displayName,
|
||||||
|
trustLevel: ref.$trustLevel
|
||||||
|
};
|
||||||
|
this.friendLog.set(ref.id, friendLogCurrent);
|
||||||
|
database.setFriendLogCurrent(friendLogCurrent);
|
||||||
}
|
}
|
||||||
ctx.displayName = ref.displayName;
|
ctx.displayName = ref.displayName;
|
||||||
this.notifyMenu('friendLog');
|
this.notifyMenu('friendLog');
|
||||||
@@ -7256,20 +7263,17 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
this.friendLogTable.data.push(friendLogHistory);
|
this.friendLogTable.data.push(friendLogHistory);
|
||||||
database.addFriendLogHistory(friendLogHistory);
|
database.addFriendLogHistory(friendLogHistory);
|
||||||
}
|
|
||||||
ctx.trustLevel = ref.$trustLevel;
|
|
||||||
this.notifyMenu('friendLog');
|
|
||||||
}
|
|
||||||
if ((ctx.displayName !== ref.displayName) ||
|
|
||||||
((ref.$trustLevel) && (ctx.trustLevel !== ref.$trustLevel))) {
|
|
||||||
var friendLogCurrent = {
|
var friendLogCurrent = {
|
||||||
userId: ref.id,
|
userId: ref.id,
|
||||||
displayName: ref.displayName,
|
displayName: ref.displayName,
|
||||||
trustLevel: ref.trustLevel
|
trustLevel: ref.$trustLevel
|
||||||
};
|
};
|
||||||
this.friendLog.set(ref.id, friendLogCurrent);
|
this.friendLog.set(ref.id, friendLogCurrent);
|
||||||
database.setFriendLogCurrent(friendLogCurrent);
|
database.setFriendLogCurrent(friendLogCurrent);
|
||||||
}
|
}
|
||||||
|
ctx.trustLevel = ref.$trustLevel;
|
||||||
|
this.notifyMenu('friendLog');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.deleteFriendLog = function (row) {
|
$app.methods.deleteFriendLog = function (row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user