From 74faaa216f0f8d29216db8c351ef2f883ae9fc67 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 26 Oct 2023 01:29:52 +0200 Subject: [PATCH] Fix PlatformIndicators colorMobileIndicator --- src/plugins/platformIndicators/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/platformIndicators/index.tsx b/src/plugins/platformIndicators/index.tsx index ae26a8f8..2972b4a4 100644 --- a/src/plugins/platformIndicators/index.tsx +++ b/src/plugins/platformIndicators/index.tsx @@ -198,13 +198,13 @@ export default definePlugin({ replacement: [ { // Return the STATUS_ONLINE_MOBILE mask if the user is on mobile, no matter the status - match: /(?<=return \i\.\i\.Masks\.STATUS_TYPING;)(.+?)(\i)\?(\i\.\i\.Masks\.STATUS_ONLINE_MOBILE):/, - replace: (_, rest, isMobile, mobileMask) => `if(${isMobile})return ${mobileMask};${rest}` + match: /\.STATUS_TYPING;switch(?=.+?(if\(\i\)return \i\.\i\.Masks\.STATUS_ONLINE_MOBILE))/, + replace: ".STATUS_TYPING;$1;switch" }, { // Return the STATUS_ONLINE_MOBILE mask if the user is on mobile, no matter the status - match: /(switch\(\i\){case \i\.\i\.ONLINE:return )(\i)\?({.+?}):/, - replace: (_, rest, isMobile, component) => `if(${isMobile})return${component};${rest}` + match: /switch\(\i\)\{case \i\.\i\.ONLINE:(if\(\i\)return\{[^}]+\})/, + replace: "$1;$&" } ] },