From 0b1c0694489b1b74b21c10ad29b59912edeb5e01 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sun, 12 May 2024 15:47:08 -0400 Subject: port to @decky/ui TODO: update package.json to match once @decky/ui is on NPM --- frontend/src/steamfixes/restart.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'frontend/src/steamfixes/restart.ts') diff --git a/frontend/src/steamfixes/restart.ts b/frontend/src/steamfixes/restart.ts index 93fc08f7..acfea3a0 100644 --- a/frontend/src/steamfixes/restart.ts +++ b/frontend/src/steamfixes/restart.ts @@ -1,4 +1,4 @@ -import { Patch, findModuleChild, replacePatch, sleep } from 'decky-frontend-lib'; +import { Export, Patch, findModuleExport, replacePatch, sleep } from '@decky/ui'; import Logger from '../logger'; @@ -18,12 +18,7 @@ export default async function restartFix() { let History: any; while (!History) { - History = findModuleChild((m) => { - if (typeof m !== 'object') return undefined; - for (let prop in m) { - if (m[prop]?.m_history) return m[prop].m_history; - } - }); + History = findModuleExport((e: Export) => e.m_history)?.m_history; if (!History) { logger.debug('Waiting 5s for history to become available.'); await sleep(5000); -- cgit v1.2.3