From 0bc0a0dadb5857bb8537b09abb9e71948098a03e Mon Sep 17 00:00:00 2001
From: AAGaming <aa@mail.catvibers.me>
Date: Fri, 14 Oct 2022 20:22:26 -0400
Subject: remove friends focus workaround

---
 frontend/src/plugin-loader.tsx | 35 -----------------------------------
 1 file changed, 35 deletions(-)

(limited to 'frontend/src/plugin-loader.tsx')

diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx
index e7fc7031..a1414b3a 100644
--- a/frontend/src/plugin-loader.tsx
+++ b/frontend/src/plugin-loader.tsx
@@ -4,9 +4,6 @@ import {
   Patch,
   QuickAccessTab,
   Router,
-  callOriginal,
-  findModuleChild,
-  replacePatch,
   showModal,
   sleep,
   staticClasses,
@@ -97,38 +94,6 @@ class PluginLoader extends Logger {
     initFilepickerPatches();
 
     this.updateVersion();
-
-    const self = this;
-
-    try {
-      // TODO remove all of this once Valve fixes the bug
-      const focusManager = findModuleChild((m) => {
-        if (typeof m !== 'object') return false;
-        for (let prop in m) {
-          if (m[prop]?.prototype?.TakeFocus) return m[prop];
-        }
-        return false;
-      });
-
-      this.focusWorkaroundPatch = replacePatch(focusManager.prototype, 'TakeFocus', function () {
-        // @ts-ignore
-        const classList = this.m_node?.m_element.classList;
-        if (
-          // @ts-ignore
-          (this.m_node?.m_element && classList.contains(staticClasses.TabGroupPanel)) ||
-          classList.contains('FriendsListTab') ||
-          classList.contains('FriendsTabList') ||
-          classList.contains('FriendsListAndChatsSteamDeck')
-        ) {
-          self.debug('Intercepted friends re-focus');
-          return true;
-        }
-
-        return callOriginal;
-      });
-    } catch (e) {
-      this.error('Friends focus patch failed', e);
-    }
   }
 
   public async updateVersion() {
-- 
cgit v1.2.3

