[UI > PluginCard] Revert using state variables

This commit is contained in:
Beef 2023-01-11 22:56:57 +00:00
parent 8a0f384c76
commit 8dd1423440

View file

@ -53,7 +53,7 @@ export default function PluginCard({ plugin }: PluginCardProps) {
leading={<FormRow.Icon source={getAssetIDByName(plugin.manifest.vendetta.icon || "ic_application_command_24px")} />}
trailing={
<FormSwitch
value={enabled}
value={plugin.enabled}
onValueChange={(v: boolean) => {
if (v) startPlugin(plugin.id); else stopPlugin(plugin.id);
setEnabled(v);
@ -80,7 +80,7 @@ export default function PluginCard({ plugin }: PluginCardProps) {
setUpdate(plugin.update);
}}
>
<Image style={styles.icon} source={getAssetIDByName(update ? "Check" : "Small")} />
<Image style={styles.icon} source={getAssetIDByName(plugin.update ? "Check" : "Small")} />
</TouchableOpacity>
{getSettings(plugin.id) && <TouchableOpacity onPress={() => showSettings(plugin)}>
<Image style={styles.icon} source={getAssetIDByName("settings")} />