mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-20 23:33:50 +02:00
Wrist online friend counter
This commit is contained in:
@@ -6670,6 +6670,9 @@ speechSynthesis.getVoices();
|
||||
this.friendsGroup3_.push(ctx);
|
||||
this.friendsGroupD_.unshift(ctx);
|
||||
}
|
||||
if (ctx.state !== newState) {
|
||||
this.updateOnlineFriendCoutner();
|
||||
}
|
||||
ctx.state = newState;
|
||||
ctx.name = ctx.ref.displayName;
|
||||
ctx.isVIP = isVIP;
|
||||
@@ -6711,6 +6714,19 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
};
|
||||
|
||||
$app.data.onlineFriendCount = 0;
|
||||
$app.methods.updateOnlineFriendCoutner = function () {
|
||||
var onlineFriendCount =
|
||||
this.friendsGroup0.length + this.friendsGroup1.length;
|
||||
if (onlineFriendCount !== this.onlineFriendCount) {
|
||||
AppApi.ExecuteVrFeedFunction(
|
||||
'updateOnlineFriendCount',
|
||||
`${onlineFriendCount}`
|
||||
);
|
||||
this.onlineFriendCount = onlineFriendCount;
|
||||
}
|
||||
};
|
||||
|
||||
// ascending
|
||||
var compareByName = function (a, b) {
|
||||
var A = String(a.name).toUpperCase();
|
||||
@@ -11413,6 +11429,10 @@ speechSynthesis.getVoices();
|
||||
this.updateVRLastLocation();
|
||||
this.updateVrNowPlaying();
|
||||
this.updateSharedFeed(true);
|
||||
AppApi.ExecuteVrFeedFunction(
|
||||
'updateOnlineFriendCount',
|
||||
`${this.onlineFriendCount}`
|
||||
);
|
||||
};
|
||||
|
||||
API.$on('LOGIN', function () {
|
||||
|
||||
Reference in New Issue
Block a user