Skip to content

Commit

Permalink
Merge pull request #1 from aeongdesu/icon-hotfix
Browse files Browse the repository at this point in the history
Icon hotfix
  • Loading branch information
FieryFlames authored Aug 6, 2023
2 parents 67d01b8 + 9098642 commit c8fb044
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/patches/MessageLongPressActionSheet.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { findByProps, findByName } from "@vendetta/metro";
import { findByProps } from "@vendetta/metro";
import { React } from "@vendetta/metro/common";
import { after, before } from "@vendetta/patcher";
import { storage } from "@vendetta/plugin";
Expand All @@ -9,8 +9,7 @@ import { showToast } from "@vendetta/ui/toasts";
const LazyActionSheet = findByProps("openLazy", "hideActionSheet");

// Components
const { FormRow } = Forms;
const Icon = findByName("Icon");
const { FormRow, FormIcon } = Forms;

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

Expand Down Expand Up @@ -56,7 +55,7 @@ export default function patchMessageLongPressActionSheet() {
};

const importRuleButton = (<FormRow
leading={<Icon source={Download} />}
leading={<FormIcon style={{ opacity: 1 }} source={Download} />}
label={`Import ${rule.name}`}
onPress={importRuleCallback}
/>);
Expand Down
7 changes: 3 additions & 4 deletions src/ui/components/AddRuleButton.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { General } from "@vendetta/ui/components";
import { General, Forms } from "@vendetta/ui/components";
import { getAssetIDByName } from "@vendetta/ui/assets";
import { findByName } from "@vendetta/metro";

// Components
const { TouchableOpacity } = General;
const Icon = findByName("Icon");
const { FormIcon } = Forms;

const Add = getAssetIDByName("ic_add_24px");

export default function AddRuleButton({ onPress }) {
return (
<TouchableOpacity onPress={onPress}>
<Icon source={Add} style={{ marginRight: -8, marginLeft: 8 }} />
<FormIcon source={Add} style={{ marginRight: -8, marginLeft: 8, opacity: 1 }} />
</TouchableOpacity>
);
};

0 comments on commit c8fb044

Please sign in to comment.