Skip to content

Commit

Permalink
Fix feed Offline location
Browse files Browse the repository at this point in the history
  • Loading branch information
Natsumi-sama committed Aug 14, 2022
1 parent 270aaea commit 9849c37
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions html/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@ speechSynthesis.getVoices();
});

API.$on('USER', function (args) {
$app.updateFriend(args.json.id, args.json.state);
args.ref = this.applyUser(args.json);
});

Expand Down Expand Up @@ -6464,10 +6465,6 @@ speechSynthesis.getVoices();
$app.updateOnlineFriendCoutner();
});

API.$on('USER', function (args) {
$app.updateFriend(args.ref.id);
});

API.$on('FRIEND:ADD', function (args) {
$app.addFriend(args.params.userId);
});
Expand Down Expand Up @@ -6722,10 +6719,10 @@ speechSynthesis.getVoices();
return;
}
this.updateFriendInProgress.set(id, Date.now());
var {location, $location_at} = ref;
// wait 2minutes then check if user came back online
workerTimers.setTimeout(() => {
this.updateFriendInProgress.delete(id);
var {location, $location_at} = ref;
this.updateFriendDelayedCheck(
id,
ctx,
Expand Down

0 comments on commit 9849c37

Please sign in to comment.