fix: restore compatibility of plugins that have custom pages

This commit is contained in:
PalmDevs 2024-02-09 23:55:36 +07:00
parent 094ff7c879
commit f2916d4b79
No known key found for this signature in database
GPG key ID: ADC432EE981495A3
3 changed files with 5 additions and 5 deletions

View file

@ -114,7 +114,7 @@ export default function PluginCard({ item: plugin, index }: CardWrapper<Plugin>)
actions={[
...(settings ? [{
icon: "settings",
onPress: () => navigation.push("RevengeCustomPage", {
onPress: () => navigation.push("VendettaCustomPage", {
title: plugin.manifest.name,
render: settings,
})

View file

@ -85,7 +85,7 @@ export const getScreens = (youKeys = false): Screen[] => [
render: Developer,
},
{
key: formatKey("RevengeCustomPage", youKeys),
key: formatKey("VendettaCustomPage", youKeys),
title: "Revenge Page",
shouldRender: () => false,
render: ({ render: PageView, noErrorBoundary, ...options }: { render: React.ComponentType; noErrorBoundary: boolean } & Record<string, object>) => {

View file

@ -80,7 +80,7 @@ export default function Developer() {
label="Asset Browser"
leading={<FormRow.Icon source={getAssetIDByName("ic_image")} />}
trailing={FormRow.Arrow}
onPress={() => navigation.push("RevengeCustomPage", {
onPress={() => navigation.push("VendettaCustomPage", {
title: "Asset Browser",
render: AssetBrowser,
})}
@ -100,8 +100,8 @@ export default function Developer() {
options: [
// @ts-expect-error
// Of course, to trigger an error, we need to do something incorrectly. The below will do!
{ label: "Revenge", onPress: () => navigation.push("RevengeCustomPage", { render: () => <undefined /> }) },
{ label: "Discord", isDestructive: true, onPress: () => navigation.push("RevengeCustomPage", { noErrorBoundary: true }) },
{ label: "Revenge", onPress: () => navigation.push("VendettaCustomPage", { render: () => <undefined /> }) },
{ label: "Discord", isDestructive: true, onPress: () => navigation.push("VendettaCustomPage", { noErrorBoundary: true }) },
],
})}
/>