mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
Add Avatar Wear Timers (#1086)
* Update avatar history table * Tracking time when swapping avis * Time spent now visible on application * Added wear time tracking on game open/close * Update avatar history table * Tracking time when swapping avis * Time spent now visible on application * Added wear time tracking on game open/close * Adjusted "ON CONFLICT" query * Removed unneccesary "previousAvatar" parameter
This commit is contained in:
@@ -106,7 +106,6 @@ export default class extends baseClass {
|
||||
travelingToInstance = json.presence.travelingToInstance;
|
||||
travelingToWorld = json.presence.travelingToWorld;
|
||||
}
|
||||
|
||||
this.applyUser({
|
||||
allowAvatarCopying: json.allowAvatarCopying,
|
||||
badges: json.badges,
|
||||
@@ -166,6 +165,8 @@ export default class extends baseClass {
|
||||
if (this.isLoggedIn) {
|
||||
if (json.currentAvatar !== ref.currentAvatar) {
|
||||
$app.addAvatarToHistory(json.currentAvatar);
|
||||
$app.addAvatarWearTime(ref.currentAvatar);
|
||||
this.currentUser.$previousAvatarSwapTime = Date.now();
|
||||
}
|
||||
Object.assign(ref, json);
|
||||
if (ref.homeLocation !== ref.$homeLocation.tag) {
|
||||
@@ -277,6 +278,7 @@ export default class extends baseClass {
|
||||
$offline_for: '',
|
||||
$location_at: Date.now(),
|
||||
$travelingToTime: Date.now(),
|
||||
$previousAvatarSwapTime: Date.now(),
|
||||
$homeLocation: {},
|
||||
$isVRCPlus: false,
|
||||
$isModerator: false,
|
||||
|
||||
Reference in New Issue
Block a user