[UI > QuickInstall] Fix install sheets (#114)

Issue: They stripped Icon component's name, find would fail
This commit is contained in:
Amsyar Rasyiq 2023-07-18 00:24:41 +08:00 committed by GitHub
parent 47761371f1
commit 23715fa8a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,9 +9,7 @@ import { showToast } from "@ui/toasts";
import { Forms } from "@ui/components";
const ForumPostLongPressActionSheet = findByName("ForumPostLongPressActionSheet", false);
const { FormRow } = Forms;
// Discord uses this Icon in action sheets. FormRow.Icon is too dark.
const Icon = findByName("Icon");
const { FormRow, FormIcon } = Forms;
const { useFirstForumPostMessage } = findByProps("useFirstForumPostMessage");
const { hideActionSheet } = findByProps("openLazy", "hideActionSheet");
@ -51,7 +49,7 @@ export default () => after("default", ForumPostLongPressActionSheet, ([{ thread
actions.unshift(<ActionsSection key="install">
<FormRow
leading={<Icon source={getAssetIDByName("ic_download_24px")} />}
leading={<FormIcon style={{ opacity: 1 }} source={getAssetIDByName("ic_download_24px")} />}
label={`Install ${postType}`}
onPress={() =>
(postType === "Plugin" ? installPlugin : installTheme)(url).then(() => {