[UI > PluginCard] Revert using state variables
This commit is contained in:
parent
8a0f384c76
commit
8dd1423440
1 changed files with 2 additions and 2 deletions
|
@ -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")} />
|
||||
|
|
Loading…
Reference in a new issue