diff --git a/html/src/app.js b/html/src/app.js index 02523975..9b73d704 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -3944,6 +3944,7 @@ speechSynthesis.getVoices(); var playerCountIndex = 0; var playerList = []; var friendList = []; + var currentUserJoinTime = ''; var currentUserLeaveTime = ''; for (var i = data.length - 1; i > -1; i--) { var ctx = data[i]; @@ -3982,6 +3983,32 @@ speechSynthesis.getVoices(); continue; } } + // on Location change remove OnPlayerJoined + if (ctx.type === 'OnPlayerJoined') { + if (ctx.created_at === currentUserJoinTime) { + continue; + } + if (ctx.data === API.currentUser.displayName) { + currentUserJoinTime = ctx.created_at; + for (var k = w - 1; k > -1; k--) { + var feedItem = wristArr[k]; + if ((feedItem.created_at === currentUserJoinTime) && + (feedItem.type === 'OnPlayerJoined')) { + wristArr.splice(k, 1); + w--; + } + } + for (var k = n - 1; k > -1; k--) { + var feedItem = notyArr[k]; + if ((feedItem.created_at === currentUserJoinTime) && + (feedItem.type === 'OnPlayerJoined')) { + notyArr.splice(k, 1); + n--; + } + } + continue; + } + } // remove current user if (((ctx.type === 'OnPlayerJoined') || (ctx.type === 'OnPlayerLeft') || @@ -3989,32 +4016,6 @@ speechSynthesis.getVoices(); (ctx.data === API.currentUser.displayName)) { continue; } - // on Location change remove OnPlayerJoined - if (ctx.type === 'Location') { - var locationBias = new Date(Date.parse(ctx.created_at) + 15000).toJSON(); //15 seconds - if (this.hideOnPlayerJoined) { - for (var k = w - 1; k > -1; k--) { - var feedItem = wristArr[k]; - if ((feedItem.created_at > locationBias) || (feedItem.type === 'Location')) { - break; - } - if (feedItem.type === 'OnPlayerJoined') { - wristArr.splice(k, 1); - w--; - } - } - } - for (var k = n - 1; k > -1; k--) { - var feedItem = notyArr[k]; - if (feedItem.created_at > locationBias) { - break; - } - if (feedItem.type === 'OnPlayerJoined') { - notyArr.splice(k, 1); - n--; - } - } - } var isFriend = false; var isFavorite = false; if ((ctx.type === 'OnPlayerJoined') || @@ -7129,7 +7130,6 @@ speechSynthesis.getVoices(); $app.data.openVRAlways = configRepository.getBool('openVRAlways'); $app.data.overlaybutton = configRepository.getBool('VRCX_overlaybutton'); $app.data.hidePrivateFromFeed = configRepository.getBool('VRCX_hidePrivateFromFeed'); - $app.data.hideOnPlayerJoined = configRepository.getBool('VRCX_hideOnPlayerJoined'); $app.data.hideDevicesFromFeed = configRepository.getBool('VRCX_hideDevicesFromFeed'); $app.data.overlayNotifications = configRepository.getBool('VRCX_overlayNotifications'); $app.data.overlayWrist = configRepository.getBool('VRCX_overlayWrist'); @@ -7150,7 +7150,6 @@ speechSynthesis.getVoices(); configRepository.setBool('openVRAlways', this.openVRAlways); configRepository.setBool('VRCX_overlaybutton', this.overlaybutton); configRepository.setBool('VRCX_hidePrivateFromFeed', this.hidePrivateFromFeed); - configRepository.setBool('VRCX_hideOnPlayerJoined', this.hideOnPlayerJoined); configRepository.setBool('VRCX_hideDevicesFromFeed', this.hideDevicesFromFeed); configRepository.setBool('VRCX_overlayNotifications', this.overlayNotifications); configRepository.setBool('VRCX_overlayWrist', this.overlayWrist); @@ -7178,7 +7177,6 @@ speechSynthesis.getVoices(); $app.watch.openVRAlways = saveOpenVROption; $app.watch.overlaybutton = saveOpenVROption; $app.watch.hidePrivateFromFeed = saveOpenVROption; - $app.watch.hideOnPlayerJoined = saveOpenVROption; $app.watch.hideDevicesFromFeed = saveOpenVROption; $app.watch.overlayNotifications = saveOpenVROption; $app.watch.overlayWrist = saveOpenVROption; diff --git a/html/src/index.pug b/html/src/index.pug index 625e9870..8534fda0 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -838,9 +838,6 @@ html div.options-container-item span.name Hide VR Devices el-switch(v-model="hideDevicesFromFeed" :disabled="!openVR || !overlayWrist") - div.options-container-item - span.name Hide Joins When Joining - el-switch(v-model="hideOnPlayerJoined" :disabled="!openVR || !overlayWrist") div.options-container-item el-button(size="small" icon="el-icon-notebook-2" @click="showWristFeedFiltersDialog()" :disabled="!openVR || !overlayWrist") Wrist Feed Filters br