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