Fix feed Offline location

This commit is contained in:
Natsumi
2022-08-14 21:18:16 +12:00
parent 270aaeab96
commit 9849c37c27
+2 -5
View File
@@ -1073,6 +1073,7 @@ speechSynthesis.getVoices();
}); });
API.$on('USER', function (args) { API.$on('USER', function (args) {
$app.updateFriend(args.json.id, args.json.state);
args.ref = this.applyUser(args.json); args.ref = this.applyUser(args.json);
}); });
@@ -6464,10 +6465,6 @@ speechSynthesis.getVoices();
$app.updateOnlineFriendCoutner(); $app.updateOnlineFriendCoutner();
}); });
API.$on('USER', function (args) {
$app.updateFriend(args.ref.id);
});
API.$on('FRIEND:ADD', function (args) { API.$on('FRIEND:ADD', function (args) {
$app.addFriend(args.params.userId); $app.addFriend(args.params.userId);
}); });
@@ -6722,10 +6719,10 @@ speechSynthesis.getVoices();
return; return;
} }
this.updateFriendInProgress.set(id, Date.now()); this.updateFriendInProgress.set(id, Date.now());
var {location, $location_at} = ref;
// wait 2minutes then check if user came back online // wait 2minutes then check if user came back online
workerTimers.setTimeout(() => { workerTimers.setTimeout(() => {
this.updateFriendInProgress.delete(id); this.updateFriendInProgress.delete(id);
var {location, $location_at} = ref;
this.updateFriendDelayedCheck( this.updateFriendDelayedCheck(
id, id,
ctx, ctx,