Skip to content

Commit

Permalink
Merge pull request Stremio#678 from Stremio/fix/addon-detail-configur…
Browse files Browse the repository at this point in the history
…e-required

fix(AddonDetailModal): remove install button when configureRequired
  • Loading branch information
tymmesyde committed Aug 28, 2024
2 parents 2b60b3a + eb39440 commit 409ff89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/common/AddonDetailsModal/AddonDetailsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ const AddonDetailsModal = ({ transportUrl, onCloseRequest }) => {
}
}
:
addonDetails.remoteAddon !== null && addonDetails.remoteAddon.content.type === 'Ready' ?
addonDetails.remoteAddon !== null &&
addonDetails.remoteAddon.content.type === 'Ready' &&
!addonDetails.remoteAddon.content.content.manifest.behaviorHints.configurationRequired ?
{

className: styles['install-button'],
Expand All @@ -131,7 +133,7 @@ const AddonDetailsModal = ({ transportUrl, onCloseRequest }) => {
}
:
null;
return toggleButton !== null ? configureButton ? [cancelButton, configureButton, toggleButton] : [cancelButton, toggleButton] : [cancelButton];
return configureButton && toggleButton ? [cancelButton, configureButton, toggleButton] : configureButton ? [cancelButton, configureButton] : toggleButton ? [cancelButton, toggleButton] : [cancelButton];
}, [addonDetails, onCloseRequest]);
const modalBackground = React.useMemo(() => {
return addonDetails.remoteAddon?.content.type === 'Ready' ? addonDetails.remoteAddon.content.content.manifest.background : null;
Expand Down

0 comments on commit 409ff89

Please sign in to comment.