From 20a78eebd406b8731025b91c9f3e53e85e09d5d7 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Tue, 20 Oct 2020 18:55:21 +1300 Subject: [PATCH] Add option to hide Private world from wrist feed --- html/src/app.js | 6 +++++- html/src/index.pug | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/html/src/app.js b/html/src/app.js index fcf227af..6ef7477d 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -3431,7 +3431,8 @@ CefSharp.BindObjectAsync( } var ctx = data[--i]; // GPS, Online, Offline, Status, Avatar - if (ctx.type !== 'Avatar') { + if ((ctx.type !== 'Avatar') && + !((ctx.type === 'GPS') && (ctx.location[0] === 'private') && (this.hidePrivateFromFeed === true))) { arr.push({ ...ctx, isFriend: this.friends.has(ctx.userId), @@ -5477,12 +5478,15 @@ CefSharp.BindObjectAsync( $app.data.visits = 0; $app.data.openVR = VRCXStorage.GetBool('openVR'); $app.data.openVRAlways = VRCXStorage.GetBool('openVRAlways'); + $app.data.hidePrivateFromFeed = VRCXStorage.GetBool('VRCX_hidePrivateFromFeed'); var saveOpenVROption = function () { VRCXStorage.SetBool('openVR', this.openVR); VRCXStorage.SetBool('openVRAlways', this.openVRAlways); + VRCXStorage.SetBool('VRCX_hidePrivateFromFeed', this.hidePrivateFromFeed); }; $app.watch.openVR = saveOpenVROption; $app.watch.openVRAlways = saveOpenVROption; + $app.watch.hidePrivateFromFeed = saveOpenVROption; $app.data.isDarkMode = VRCXStorage.GetBool('isDarkMode'); $appDarkStyle.disabled = $app.data.isDarkMode === false; $app.watch.isDarkMode = function () { diff --git a/html/src/index.pug b/html/src/index.pug index 65b7bd31..af4a7692 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -497,6 +497,9 @@ html div(style="font-size:12px;margin-top:5px") span(style="display:inline-block;min-width:150px") Force Run el-switch(v-model="openVRAlways") + div(style="font-size:12px;margin-top:5px") + span(style="display:inline-block;min-width:150px") Hide Private worlds + el-switch(v-model="hidePrivateFromFeed") div(style="margin-top:30px") span(style="font-weight:bold") Window div(style="font-size:12px;margin-top:5px")