mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 14:46:04 +02:00
Moderations in playerList
This commit is contained in:
+28
-14
@@ -440,6 +440,34 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
if (typeof ref !== 'undefined') {
|
||||
location = ref.location;
|
||||
$location_at = ref.$location_at;
|
||||
|
||||
// wtf, fetch user if offline in an instance
|
||||
if (
|
||||
ctx.state !== 'online' &&
|
||||
isRealInstance(ref.location) &&
|
||||
ref.$lastFetch < Date.now() - 10000 // 10 seconds
|
||||
) {
|
||||
console.log(
|
||||
`Fetching offline friend in an instance ${ctx.name}`
|
||||
);
|
||||
userRequest.getUser({
|
||||
userId: id
|
||||
});
|
||||
}
|
||||
// wtf, fetch user if online in an offline location
|
||||
if (
|
||||
ctx.state === 'online' &&
|
||||
ref.location === 'offline' &&
|
||||
ref.$lastFetch < Date.now() - 10000 // 10 seconds
|
||||
) {
|
||||
console.log(
|
||||
`Fetching online friend in an offline location ${ctx.name}`
|
||||
);
|
||||
userRequest.getUser({
|
||||
userId: id
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (typeof stateInput === 'undefined' || ctx.state === stateInput) {
|
||||
// this is should be: undefined -> user
|
||||
@@ -489,20 +517,6 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
state.sortOfflineFriends = true;
|
||||
}
|
||||
}
|
||||
// wtf, fetch user if offline in an instance
|
||||
if (
|
||||
ctx.state !== 'online' &&
|
||||
typeof ref !== 'undefined' &&
|
||||
isRealInstance(ref.location) &&
|
||||
ref.$lastFetch < Date.now() - 10000 // 10 seconds
|
||||
) {
|
||||
console.log(
|
||||
`Fetching offline friend in an instance ${ctx.name}`
|
||||
);
|
||||
userRequest.getUser({
|
||||
userId: id
|
||||
});
|
||||
}
|
||||
} else if (
|
||||
ctx.state === 'online' &&
|
||||
(stateInput === 'active' || stateInput === 'offline')
|
||||
|
||||
Reference in New Issue
Block a user