From b7ed6bb88ff55657a1219d72b775075161cb4116 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Tue, 22 Jul 2025 18:58:49 +0700 Subject: [PATCH] fix(plugins/staff-settings): use API from parameter, show toast instead of attempting refresh --- src/plugins/init/staff-settings/index.tsx | 28 +++++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/plugins/init/staff-settings/index.tsx b/src/plugins/init/staff-settings/index.tsx index 546e6eb..c10097e 100644 --- a/src/plugins/init/staff-settings/index.tsx +++ b/src/plugins/init/staff-settings/index.tsx @@ -1,5 +1,3 @@ -import { getStore, Stores } from '@revenge-mod/discord/common/flux' -import { refreshSettingsOverviewScreen } from '@revenge-mod/discord/modules/settings' import { byProps } from '@revenge-mod/modules/finders/filters' import { getModule } from '@revenge-mod/modules/finders/get' import { instead } from '@revenge-mod/patcher' @@ -16,7 +14,25 @@ registerPlugin( icon: 'StaffBadgeIcon', }, { - start({ cleanup, logger }) { + start({ cleanup, logger, unscoped }) { + const { + utils: { + discord: { lookupGeneratedIconComponent }, + }, + discord: { + common: { + flux: { getStore, Stores }, + }, + actions: { ToastActionCreators }, + }, + } = unscoped + + const CircleInformationIcon = lookupGeneratedIconComponent( + 'CircleInformationIcon', + 'CircleInformationIcon-secondary', + 'CircleInformationIcon-primary', + ) + function reset() { getStore<{ initialize(): void @@ -34,8 +50,10 @@ registerPlugin( store.initialize() unpatch() - setTimeout(() => { - refreshSettingsOverviewScreen(true) + ToastActionCreators.open({ + key: 'staff-settings-action', + content: 'Navigate out of Settings to apply changes', + IconComponent: CircleInformationIcon, }) }) }