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
+16
View File
@@ -5471,6 +5471,21 @@ speechSynthesis.getVoices();
this.updateFriendInProgress.delete(id); 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 // ascending
var compareByName = function (a, b) { var compareByName = function (a, b) {
var A = String(a.name).toUpperCase(); var A = String(a.name).toUpperCase();
@@ -5763,6 +5778,7 @@ speechSynthesis.getVoices();
], ],
time: props.location[2] time: props.location[2]
}); });
$app.updateFriendGPS(ref.id);
$app.feedDownloadWorldCache(ref); $app.feedDownloadWorldCache(ref);
} }
if (props.currentAvatarImageUrl || if (props.currentAvatarImageUrl ||