From 96ea57c559d68a9e08245115c3214607b6cc5d8e Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Fri, 24 Oct 2025 14:50:35 +0700 Subject: [PATCH] fix(plugins/settings): navigate to Plugins screen correctly in plugin error alert --- .../components/PluginsFailedToStartAlert.tsx | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/plugins/start/settings/components/PluginsFailedToStartAlert.tsx b/src/plugins/start/settings/components/PluginsFailedToStartAlert.tsx index b27bfac..84e36da 100644 --- a/src/plugins/start/settings/components/PluginsFailedToStartAlert.tsx +++ b/src/plugins/start/settings/components/PluginsFailedToStartAlert.tsx @@ -39,6 +39,19 @@ export default function PluginsFailedToStartAlert({ variant="primary" text="View plugins" onPress={() => { + /** + * Discord's navigator hierarchy: + * + * main (Stack) + * - tabs (BottomTab) + * - guilds + * - notifications + * - you + * - settings (Stack) + * - ... + * - (our screens) + */ + const params = { filter: ['Has Errors'], } @@ -48,11 +61,12 @@ export default function PluginsFailedToStartAlert({ RouteNames.RevengePlugins ) navigation.setParams(params) + // React Navigation will bubble our requests to the main navigator if we're already in settings else - navigation.navigate( - RouteNames.RevengePlugins, + navigation.navigate('settings', { + screen: RouteNames.RevengePlugins, params, - ) + }) }} />