Bring user to the top of aside list on GPS

This commit is contained in:
Natsumi
2021-05-30 00:45:15 +12:00
parent ebccab37c9
commit 4360ef8fe2

View File

@@ -5471,6 +5471,21 @@ speechSynthesis.getVoices();
this.updateFriendInProgress.delete(id);
};
$app.methods.updateFriendGPS = function (userId) {
var ctx = this.friends.get(userId);
if ((typeof ctx.ref !== 'undefined') &&
(ctx.ref.location !== 'private') &&
(ctx.state === 'online')) {
if (ctx.isVIP) {
removeFromArray(this.friendsGroupA_, ctx);
this.friendsGroupA_.unshift(ctx);
} else {
removeFromArray(this.friendsGroupB_, ctx);
this.friendsGroupB_.unshift(ctx);
}
}
};
// ascending
var compareByName = function (a, b) {
var A = String(a.name).toUpperCase();
@@ -5760,9 +5775,10 @@ speechSynthesis.getVoices();
location: [
props.location[0],
props.location[1]
],
],
time: props.location[2]
});
$app.updateFriendGPS(ref.id);
$app.feedDownloadWorldCache(ref);
}
if (props.currentAvatarImageUrl ||