fix: playerlist usertimer reset when befriending a user (#837)

This commit is contained in:
pa
2026-03-18 11:15:45 +09:00
parent e05da92d1b
commit 0292cbb80c
+7 -3
View File
@@ -255,9 +255,13 @@ export function applyUser(json) {
} }
if (hasPropChanged) { if (hasPropChanged) {
if (changedProps.location && changedProps.location[0] !== 'traveling') { if (changedProps.location && changedProps.location[0] !== 'traveling') {
const ts = Date.now(); if (playerListRef) {
changedProps.location.push(ts - ref.$location_at); ref.$location_at = playerListRef.joinTime;
ref.$location_at = ts; } else {
const ts = Date.now();
changedProps.location.push(ts - ref.$location_at);
ref.$location_at = ts;
}
} }
handleUserUpdate(ref, changedProps); handleUserUpdate(ref, changedProps);
if (AppDebug.debugUserDiff) { if (AppDebug.debugUserDiff) {