diff --git a/html/src/app.js b/html/src/app.js index 09d13f22..3931ea78 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -3659,7 +3659,7 @@ speechSynthesis.getVoices(); this.updateSharedFeedFeedTable(forceUpdate); this.updateSharedFeedNotificationTable(forceUpdate); this.updateSharedFeedFriendLogTable(forceUpdate); - this.updateSharedFeedPlayerModerationTable(forceUpdate); + //this.updateSharedFeedPlayerModerationTable(forceUpdate); var feeds = this.sharedFeed; if (!feeds.pendingUpdate) { return; @@ -3766,13 +3766,12 @@ speechSynthesis.getVoices(); var n = 0; var wristFilter = this.sharedFeedFilters.wrist; var notyFilter = this.sharedFeedFilters.noty; - var locationChange = false; var playerCountIndex = 0; var playerList = []; var friendList = []; - while ((w < 20) || (n < 5) || ((!locationChange) && (this.hideOnPlayerJoined))) { - var ctx = data[--i]; - if ((i <= -1) || (ctx.created_at < bias)) { + for (var i = data.length - 1; i > -1; i--) { + var ctx = data[i]; + if (ctx.created_at < bias) { break; } if (ctx.type === 'Notification') { @@ -3808,9 +3807,6 @@ speechSynthesis.getVoices(); n--; } } - if (w >= 20) { - locationChange = true; - } } var isFriend = false; var isFavorite = false; @@ -3909,9 +3905,9 @@ speechSynthesis.getVoices(); var n = 0; var wristFilter = this.sharedFeedFilters.wrist; var notyFilter = this.sharedFeedFilters.noty; - while ((w < 20) || (n < 5)) { - var ctx = data[--i]; - if ((i <= -1) || (ctx.created_at < bias)) { + for (var i = data.length - 1; i > -1; i--) { + var ctx = data[i]; + if (ctx.created_at < bias) { break; } if (ctx.type === 'Avatar') { @@ -3970,9 +3966,9 @@ speechSynthesis.getVoices(); var n = 0; var wristFilter = this.sharedFeedFilters.wrist; var notyFilter = this.sharedFeedFilters.noty; - while ((w < 20) || (n < 5)) { - var ctx = data[--i]; - if ((i <= -1) || (ctx.created_at < bias)) { + for (var i = data.length - 1; i > -1; i--) { + var ctx = data[i]; + if (ctx.created_at < bias) { break; } if (ctx.senderUserId === API.currentUser.id) { @@ -4028,9 +4024,9 @@ speechSynthesis.getVoices(); var n = 0; var wristFilter = this.sharedFeedFilters.wrist; var notyFilter = this.sharedFeedFilters.noty; - while ((w < 20) || (n < 5)) { - var ctx = data[--i]; - if ((i <= -1) || (ctx.created_at < bias)) { + for (var i = data.length - 1; i > -1; i--) { + var ctx = data[i]; + if (ctx.created_at < bias) { break; } if (ctx.type === 'FriendRequest') { @@ -4086,9 +4082,9 @@ speechSynthesis.getVoices(); var n = 0; var wristFilter = this.sharedFeedFilters.wrist; var notyFilter = this.sharedFeedFilters.noty; - while ((w < 20) || (n < 5)) { - var ctx = data[--i]; - if ((i <= -1) || (ctx.created < bias)) { + for (var i = data.length - 1; i > -1; i--) { + var ctx = data[i]; + if (ctx.created < bias) { break; } if (ctx.sourceUserId === API.currentUser.id) { diff --git a/html/src/vr.js b/html/src/vr.js index a5e3b3eb..48f91375 100644 --- a/html/src/vr.js +++ b/html/src/vr.js @@ -744,11 +744,14 @@ speechSynthesis.getVoices(); this.currentUserStatus = sharedRepository.getString('current_user_status'); this.isGameRunning = sharedRepository.getBool('is_game_running'); this.isGameNoVR = sharedRepository.getBool('is_Game_No_VR'); - this.lastLocation = sharedRepository.getObject('last_location'); - if (this.lastLocation.date !== 0) { - this.lastLocationTimer = timeToText(Date.now() - this.lastLocation.date); - } else { - this.lastLocationTimer = ''; + var lastLocation = sharedRepository.getObject('last_location'); + if (lastLocation) { + this.lastLocation = lastLocation; + if (this.lastLocation.date !== 0) { + this.lastLocationTimer = timeToText(Date.now() - this.lastLocation.date); + } else { + this.lastLocationTimer = ''; + } } var newConfig = sharedRepository.getObject('VRConfigVars'); if (newConfig) {