summaryrefslogtreecommitdiff
path: root/frontend/src/components/modals/filepicker/patches/library.ts
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2024-05-12 15:47:08 -0400
committerAAGaming <aagaming@riseup.net>2024-05-12 15:47:08 -0400
commit0b1c0694489b1b74b21c10ad29b59912edeb5e01 (patch)
tree659ef5ba75e3678c60bbf27c8a854e00e0bf74b2 /frontend/src/components/modals/filepicker/patches/library.ts
parent43b940e216e6b654e689cf791d298d57215196d4 (diff)
downloaddecky-loader-0b1c0694489b1b74b21c10ad29b59912edeb5e01.tar.gz
decky-loader-0b1c0694489b1b74b21c10ad29b59912edeb5e01.zip
port to @decky/ui
TODO: update package.json to match once @decky/ui is on NPM
Diffstat (limited to 'frontend/src/components/modals/filepicker/patches/library.ts')
-rw-r--r--frontend/src/components/modals/filepicker/patches/library.ts9
1 files changed, 2 insertions, 7 deletions
diff --git a/frontend/src/components/modals/filepicker/patches/library.ts b/frontend/src/components/modals/filepicker/patches/library.ts
index 71eb9541..3b7fa679 100644
--- a/frontend/src/components/modals/filepicker/patches/library.ts
+++ b/frontend/src/components/modals/filepicker/patches/library.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';
import { FileSelectionType } from '..';
@@ -39,12 +39,7 @@ export default async function libraryPatch() {
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);