mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-22 00:03:51 +02:00
Small changes
This commit is contained in:
111
html/src/app.js
111
html/src/app.js
@@ -2805,45 +2805,49 @@ speechSynthesis.getVoices();
|
||||
|
||||
API.refreshNotifications = async function () {
|
||||
this.isNotificationsLoading = true;
|
||||
this.expireFriendRequestNotifications();
|
||||
var params = {
|
||||
n: 100,
|
||||
offset: 0
|
||||
};
|
||||
var count = 50; // 5000 max
|
||||
for (var i = 0; i < count; i++) {
|
||||
var args = await this.getNotifications(params);
|
||||
$app.unseenNotifications = [];
|
||||
params.offset += 100;
|
||||
if (args.json.length < 100) {
|
||||
break;
|
||||
try {
|
||||
this.expireFriendRequestNotifications();
|
||||
var params = {
|
||||
n: 100,
|
||||
offset: 0
|
||||
};
|
||||
var count = 50; // 5000 max
|
||||
for (var i = 0; i < count; i++) {
|
||||
var args = await this.getNotifications(params);
|
||||
$app.unseenNotifications = [];
|
||||
params.offset += 100;
|
||||
if (args.json.length < 100) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
var params = {
|
||||
n: 100,
|
||||
offset: 0
|
||||
};
|
||||
var count = 50; // 5000 max
|
||||
for (var i = 0; i < count; i++) {
|
||||
var args = await this.getNotificationsV2(params);
|
||||
$app.unseenNotifications = [];
|
||||
params.offset += 100;
|
||||
if (args.json.length < 100) {
|
||||
break;
|
||||
var params = {
|
||||
n: 100,
|
||||
offset: 0
|
||||
};
|
||||
var count = 50; // 5000 max
|
||||
for (var i = 0; i < count; i++) {
|
||||
var args = await this.getNotificationsV2(params);
|
||||
$app.unseenNotifications = [];
|
||||
params.offset += 100;
|
||||
if (args.json.length < 100) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
var params = {
|
||||
n: 100,
|
||||
offset: 0
|
||||
};
|
||||
var count = 50; // 5000 max
|
||||
for (var i = 0; i < count; i++) {
|
||||
var args = await this.getHiddenFriendRequests(params);
|
||||
$app.unseenNotifications = [];
|
||||
params.offset += 100;
|
||||
if (args.json.length < 100) {
|
||||
break;
|
||||
var params = {
|
||||
n: 100,
|
||||
offset: 0
|
||||
};
|
||||
var count = 50; // 5000 max
|
||||
for (var i = 0; i < count; i++) {
|
||||
var args = await this.getHiddenFriendRequests(params);
|
||||
$app.unseenNotifications = [];
|
||||
params.offset += 100;
|
||||
if (args.json.length < 100) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
this.isNotificationsLoading = false;
|
||||
};
|
||||
@@ -2933,6 +2937,28 @@ speechSynthesis.getVoices();
|
||||
});
|
||||
});
|
||||
|
||||
API.$on('NOTIFICATION:V2:UPDATE', function (args) {
|
||||
var notificationId = args.params.notificationId;
|
||||
var json = args.json;
|
||||
if (!json) {
|
||||
return;
|
||||
}
|
||||
json.id = notificationId;
|
||||
this.$emit('NOTIFICATION', {
|
||||
json,
|
||||
params: {
|
||||
notificationId
|
||||
}
|
||||
});
|
||||
if (json.seen) {
|
||||
this.$emit('NOTIFICATION:SEE', {
|
||||
params: {
|
||||
notificationId
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
params: {
|
||||
notificationId: string,
|
||||
@@ -4183,6 +4209,16 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
break;
|
||||
|
||||
case 'notification-v2-update':
|
||||
console.log('notification-v2-update', content);
|
||||
this.$emit('NOTIFICATION:V2:UPDATE', {
|
||||
json: content.updates,
|
||||
params: {
|
||||
notificationId: content.id
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case 'see-notification':
|
||||
this.$emit('NOTIFICATION:SEE', {
|
||||
params: {
|
||||
@@ -11161,6 +11197,9 @@ speechSynthesis.getVoices();
|
||||
var partyId = `${L.worldId}:${L.instanceName}`;
|
||||
var partySize = this.lastLocation.playerList.size;
|
||||
var partyMaxSize = L.worldCapacity;
|
||||
if (partySize > partyMaxSize) {
|
||||
partyMaxSize = partySize;
|
||||
}
|
||||
var buttonText = 'Join';
|
||||
var buttonUrl = L.joinUrl;
|
||||
if (!this.discordJoinButton) {
|
||||
|
||||
Reference in New Issue
Block a user