From 3a38cf807460f6c141ce4b131cef1944339778ae Mon Sep 17 00:00:00 2001
From: AAGaming <aagaming@riseup.net>
Date: Wed, 13 Dec 2023 22:06:22 -0500
Subject: fix(developer): add back valve internal on beta

look i was tired when writing yesterday's fix okay
---
 frontend/src/developer.tsx | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

(limited to 'frontend/src/developer.tsx')

diff --git a/frontend/src/developer.tsx b/frontend/src/developer.tsx
index b09eab64..ad5d8a40 100644
--- a/frontend/src/developer.tsx
+++ b/frontend/src/developer.tsx
@@ -24,19 +24,9 @@ export async function setShowValveInternal(show: boolean) {
         ) as any
       ];
 
-    if (mobx.observe_) {
-      // New style, currently broken
-      logger.log('Valve internal not yet supported on this build.');
-      // removeSettingsObserver = mobx.observe_(mobx, [(e: any) => {
-      //   console.log("got e", e)
-      //   e.newValue.bIsValveEmail = true;
-      // }]);
-    } else if (mobx.observe) {
-      // Old style
-      removeSettingsObserver = mobx.observe((e: any) => {
-        e.newValue.bIsValveEmail = true;
-      });
-    }
+    removeSettingsObserver = (mobx.observe_ || mobx.observe).call(mobx, (e: any) => {
+      e.newValue.bIsValveEmail = true;
+    });
 
     window.settingsStore.m_Settings.bIsValveEmail = true;
     logger.log('Enabled Valve Internal menu');
-- 
cgit v1.2.3

