Skip to content

Commit dbae901

Browse files
committed
findByName-ification
1 parent 7c35590 commit dbae901

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/patches/MessageLongPressActionSheet.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { findByDisplayName, findByProps } from "@vendetta/metro";
1+
import { findByProps } from "@vendetta/metro";
2+
import { React } from "@vendetta/metro/common";
23
import { after, before } from "@vendetta/patcher";
34
import { storage } from "@vendetta/plugin";
45
import { getAssetIDByName } from "@vendetta/ui/assets";
@@ -8,8 +9,7 @@ import { showToast } from "@vendetta/ui/toasts";
89
const LazyActionSheet = findByProps("openLazy", "hideActionSheet");
910

1011
// Components
11-
const { FormRow } = Forms;
12-
const Icon = findByDisplayName("Icon");
12+
const { FormRow: { default: FormRow, Icon } } = Forms;
1313

1414
const JSON_CODEBLOCK_PATTERN = /^```(?:json)\n([\s\S]*?)```$/gm
1515

src/ui/components/AddRuleButton.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { General } from "@vendetta/ui/components";
1+
import { Forms, General } from "@vendetta/ui/components";
22
import { getAssetIDByName } from "@vendetta/ui/assets";
3-
import { findByDisplayName } from "@vendetta/metro";
43

54
// Components
65
const { TouchableOpacity } = General;
7-
const Icon = findByDisplayName("Icon");
6+
const { FormRow: { Icon } } = Forms;
87

98
const Add = getAssetIDByName("ic_add_24px");
109

src/ui/pages/Settings.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { findByDisplayName, findByProps } from "@vendetta/metro";
1+
import { findByName } from "@vendetta/metro";
22
import { constants as Constants, NavigationNative, React, stylesheet as StyleSheet } from "@vendetta/metro/common";
33
import { storage } from "@vendetta/plugin";
44
import { useProxy } from "@vendetta/storage";
@@ -24,7 +24,7 @@ const styles = StyleSheet.createThemedStyleSheet({
2424
}
2525
})
2626

27-
const useIsFocused = findByDisplayName("useIsFocused");
27+
const useIsFocused = findByName("useIsFocused");
2828

2929
export default function Settings() {
3030
const [newRule, setNewRule] = React.useState("")

0 commit comments

Comments
 (0)