From 26c7feaa391162f0a718fdcb6684a32949621619 Mon Sep 17 00:00:00 2001 From: nexpid <60316309+nexpid@users.noreply.github.com> Date: Wed, 6 Nov 2024 20:42:48 +0100 Subject: [PATCH] feat(LoginWithQR): Update (#93) * fix: fix loginwithqr + devcompanion lazy fix * Description One Line --------- Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com> --- src/equicordplugins/loginWithQR/index.tsx | 2 +- src/plugins/devCompanion/initWs.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/equicordplugins/loginWithQR/index.tsx b/src/equicordplugins/loginWithQR/index.tsx index 955576ab..396513e2 100644 --- a/src/equicordplugins/loginWithQR/index.tsx +++ b/src/equicordplugins/loginWithQR/index.tsx @@ -59,7 +59,7 @@ export default definePlugin({ replacement: { // Find the Edit User Profile button and insert our custom button. // A bit jank, but whatever - match: /,(.{0,20}\.Button,.{0,100}#{intl::USER_SETTINGS_EDIT_USER_PROFILE}\)}\))/, + match: /,(\(.{1,90}#{intl::USER_SETTINGS_EDIT_USER_PROFILE}\)}\))/, replace: ",$self.insertScanQrButton($1)", }, }, diff --git a/src/plugins/devCompanion/initWs.tsx b/src/plugins/devCompanion/initWs.tsx index 0a048666..364f7875 100644 --- a/src/plugins/devCompanion/initWs.tsx +++ b/src/plugins/devCompanion/initWs.tsx @@ -282,11 +282,11 @@ export function initWs(isManual = false) { const { find, replacement } = data as PatchData; let candidates; - if (data.findType === FindType.STRING) - candidates = search(find.toString()); + if (data.findType === FindType.REGEX) + candidates = search(...mkRegexFind(find)); else - candidates = search(...mkRegexFind(find)); + candidates = search(find.toString()); // const candidates = search(find); const keys = Object.keys(candidates);