mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Remove OnPlayerJoined on Location change option
This commit is contained in:
+5
-5
@@ -3436,7 +3436,7 @@ speechSynthesis.getVoices();
|
|||||||
var { data } = this.gameLogTable;
|
var { data } = this.gameLogTable;
|
||||||
var i = data.length;
|
var i = data.length;
|
||||||
var j = 0;
|
var j = 0;
|
||||||
while (j < 30) {
|
while (j < 100) {
|
||||||
if (i <= 0) {
|
if (i <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -3466,7 +3466,7 @@ speechSynthesis.getVoices();
|
|||||||
var { data } = this.feedTable;
|
var { data } = this.feedTable;
|
||||||
var i = data.length;
|
var i = data.length;
|
||||||
var j = 0;
|
var j = 0;
|
||||||
while (j < 30) {
|
while (j < 100) {
|
||||||
if (i <= 0) {
|
if (i <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -3515,9 +3515,6 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
if (arr.length > 30) {
|
|
||||||
arr.length = 30;
|
|
||||||
}
|
|
||||||
sharedRepository.setArray('feeds', arr);
|
sharedRepository.setArray('feeds', arr);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5697,6 +5694,7 @@ speechSynthesis.getVoices();
|
|||||||
$app.data.openVRAlways = configRepository.getBool('openVRAlways');
|
$app.data.openVRAlways = configRepository.getBool('openVRAlways');
|
||||||
$app.data.overlaybutton = configRepository.getBool('VRCX_overlaybutton');
|
$app.data.overlaybutton = configRepository.getBool('VRCX_overlaybutton');
|
||||||
$app.data.hidePrivateFromFeed = configRepository.getBool('VRCX_hidePrivateFromFeed');
|
$app.data.hidePrivateFromFeed = configRepository.getBool('VRCX_hidePrivateFromFeed');
|
||||||
|
$app.data.hideOnPlayerJoined = configRepository.getBool('VRCX_hideOnPlayerJoined');
|
||||||
$app.data.hideDevicesFromFeed = configRepository.getBool('VRCX_hideDevicesFromFeed');
|
$app.data.hideDevicesFromFeed = configRepository.getBool('VRCX_hideDevicesFromFeed');
|
||||||
$app.data.overlayNotifications = configRepository.getBool('VRCX_overlayNotifications');
|
$app.data.overlayNotifications = configRepository.getBool('VRCX_overlayNotifications');
|
||||||
$app.data.desktopToast = configRepository.getBool('VRCX_desktopToast');
|
$app.data.desktopToast = configRepository.getBool('VRCX_desktopToast');
|
||||||
@@ -5710,6 +5708,7 @@ speechSynthesis.getVoices();
|
|||||||
configRepository.setBool('openVRAlways', this.openVRAlways);
|
configRepository.setBool('openVRAlways', this.openVRAlways);
|
||||||
configRepository.setBool('VRCX_overlaybutton', this.overlaybutton);
|
configRepository.setBool('VRCX_overlaybutton', this.overlaybutton);
|
||||||
configRepository.setBool('VRCX_hidePrivateFromFeed', this.hidePrivateFromFeed);
|
configRepository.setBool('VRCX_hidePrivateFromFeed', this.hidePrivateFromFeed);
|
||||||
|
configRepository.setBool('VRCX_hideOnPlayerJoined', this.hideOnPlayerJoined);
|
||||||
configRepository.setBool('VRCX_hideDevicesFromFeed', this.hideDevicesFromFeed);
|
configRepository.setBool('VRCX_hideDevicesFromFeed', this.hideDevicesFromFeed);
|
||||||
configRepository.setBool('VRCX_overlayNotifications', this.overlayNotifications);
|
configRepository.setBool('VRCX_overlayNotifications', this.overlayNotifications);
|
||||||
configRepository.setBool('VRCX_desktopToast', this.desktopToast);
|
configRepository.setBool('VRCX_desktopToast', this.desktopToast);
|
||||||
@@ -5730,6 +5729,7 @@ speechSynthesis.getVoices();
|
|||||||
$app.watch.openVRAlways = saveOpenVROption;
|
$app.watch.openVRAlways = saveOpenVROption;
|
||||||
$app.watch.overlaybutton = saveOpenVROption;
|
$app.watch.overlaybutton = saveOpenVROption;
|
||||||
$app.watch.hidePrivateFromFeed = saveOpenVROption;
|
$app.watch.hidePrivateFromFeed = saveOpenVROption;
|
||||||
|
$app.watch.hideOnPlayerJoined = saveOpenVROption;
|
||||||
$app.watch.hideDevicesFromFeed = saveOpenVROption;
|
$app.watch.hideDevicesFromFeed = saveOpenVROption;
|
||||||
$app.watch.overlayNotifications = saveOpenVROption;
|
$app.watch.overlayNotifications = saveOpenVROption;
|
||||||
$app.watch.desktopToast = saveOpenVROption;
|
$app.watch.desktopToast = saveOpenVROption;
|
||||||
|
|||||||
@@ -565,6 +565,9 @@ html
|
|||||||
div.options-container-item
|
div.options-container-item
|
||||||
span.name Hide Private Worlds
|
span.name Hide Private Worlds
|
||||||
el-switch(v-model="hidePrivateFromFeed" :disabled="!openVR")
|
el-switch(v-model="hidePrivateFromFeed" :disabled="!openVR")
|
||||||
|
div.options-container-item
|
||||||
|
span.name Hide Joins When Joining
|
||||||
|
el-switch(v-model="hideOnPlayerJoined" :disabled="!openVR")
|
||||||
div.options-container-item
|
div.options-container-item
|
||||||
span.name Hide VR Devices
|
span.name Hide VR Devices
|
||||||
el-switch(v-model="hideDevicesFromFeed" :disabled="!openVR")
|
el-switch(v-model="hideDevicesFromFeed" :disabled="!openVR")
|
||||||
|
|||||||
+24
-1
@@ -741,6 +741,7 @@ speechSynthesis.getVoices();
|
|||||||
this.overlayNotificationsToggle = configRepository.getBool('VRCX_overlayNotifications');
|
this.overlayNotificationsToggle = configRepository.getBool('VRCX_overlayNotifications');
|
||||||
this.desktopToastToggle = configRepository.getBool('VRCX_desktopToast');
|
this.desktopToastToggle = configRepository.getBool('VRCX_desktopToast');
|
||||||
this.hidePrivateFromFeed = configRepository.getBool('VRCX_hidePrivateFromFeed');
|
this.hidePrivateFromFeed = configRepository.getBool('VRCX_hidePrivateFromFeed');
|
||||||
|
this.hideOnPlayerJoined = configRepository.getBool('VRCX_hideOnPlayerJoined');
|
||||||
this.hideDevicesToggle = configRepository.getBool('VRCX_hideDevicesFromFeed');
|
this.hideDevicesToggle = configRepository.getBool('VRCX_hideDevicesFromFeed');
|
||||||
this.isMinimalFeed = configRepository.getBool('VRCX_minimalFeed');
|
this.isMinimalFeed = configRepository.getBool('VRCX_minimalFeed');
|
||||||
this.displayVRCPlusIconsAsAvatar = configRepository.getBool('displayVRCPlusIconsAsAvatar');
|
this.displayVRCPlusIconsAsAvatar = configRepository.getBool('displayVRCPlusIconsAsAvatar');
|
||||||
@@ -840,7 +841,8 @@ speechSynthesis.getVoices();
|
|||||||
var joining = true;
|
var joining = true;
|
||||||
for (var k = 0; k < feeds.length; k++) {
|
for (var k = 0; k < feeds.length; k++) {
|
||||||
var feedItem = feeds[k];
|
var feedItem = feeds[k];
|
||||||
if ((feedItem.type === 'OnPlayerJoined') && (feedItem.data === ctx.displayName)) {
|
if (((feedItem.type === 'OnPlayerJoined') && (feedItem.data === ctx.displayName)) ||
|
||||||
|
((feedItem.type === 'Friend') && (feedItem.displayName === ctx.displayName))) {
|
||||||
joining = false;
|
joining = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -863,6 +865,26 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//on Location change remove OnPlayerJoined
|
||||||
|
if (this.hideOnPlayerJoined) {
|
||||||
|
for (i = 0; i < feeds.length; i++) {
|
||||||
|
var ctx = feeds[i];
|
||||||
|
if (ctx.type === 'Location') {
|
||||||
|
var bias = new Date(Date.parse(ctx.created_at) + 10000).toJSON();
|
||||||
|
for (var k = i - 1; k > 0; k--) {
|
||||||
|
var feedItem = feeds[k];
|
||||||
|
if (feedItem.type === 'OnPlayerJoined') {
|
||||||
|
feeds.splice(k, 1);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
if ((feedItem.created_at > bias) || (feedItem.type === 'Location')) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.hidePrivateFromFeed) {
|
if (this.hidePrivateFromFeed) {
|
||||||
for (var i = 0; i < feeds.length; i++) {
|
for (var i = 0; i < feeds.length; i++) {
|
||||||
var feed = feeds[i];
|
var feed = feeds[i];
|
||||||
@@ -873,6 +895,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
feeds.splice(25);
|
||||||
if (this.appType === '1') {
|
if (this.appType === '1') {
|
||||||
this.updateSharedFeedWrist(feeds);
|
this.updateSharedFeedWrist(feeds);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user