From 0e49e5e8f6bf3727a7d4bc0a4dfe12cf05fcfd5a Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 21 Jun 2024 16:16:01 +0200 Subject: [PATCH] fix: update switch device and notifications patch (#688) --- src/renderer/patches/enableNotificationsByDefault.ts | 2 +- src/renderer/patches/hideSwitchDevice.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/patches/enableNotificationsByDefault.ts b/src/renderer/patches/enableNotificationsByDefault.ts index f48115d..5854977 100644 --- a/src/renderer/patches/enableNotificationsByDefault.ts +++ b/src/renderer/patches/enableNotificationsByDefault.ts @@ -13,7 +13,7 @@ addPatch({ replacement: { // FIXME: fix eslint rule // eslint-disable-next-line no-useless-escape - match: /\.isPlatformEmbedded(?=\?\i\.DesktopNotificationTypes\.ALL)/g, + match: /\.isPlatformEmbedded(?=\?\i\.\i\.ALL)/g, replace: "$&||true" } } diff --git a/src/renderer/patches/hideSwitchDevice.tsx b/src/renderer/patches/hideSwitchDevice.tsx index 911aed7..20aa51a 100644 --- a/src/renderer/patches/hideSwitchDevice.tsx +++ b/src/renderer/patches/hideSwitchDevice.tsx @@ -12,7 +12,7 @@ addPatch({ find: "lastOutputSystemDevice.justChanged", replacement: { // eslint-disable-next-line no-useless-escape - match: /(\i)\.default\.getState\(\).neverShowModal/, + match: /(\i)\.\i\.getState\(\).neverShowModal/, replace: "$& || $self.shouldIgnore($1)" } }