Skip to content

Commit

Permalink
Handle source not supporting browse "latest" (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
schroda authored Nov 5, 2023
1 parent 134e477 commit d9d92a7
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/screens/SourceMangas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,16 @@ export function SourceMangas() {
>
{t('global.button.popular')}
</ContentTypeButton>
<ContentTypeButton
variant={contentType === SourceContentType.LATEST ? 'contained' : 'outlined'}
startIcon={<NewReleasesIcon />}
onClick={() => updateContentType(SourceContentType.LATEST)}
>
{t('global.button.latest')}
</ContentTypeButton>
{source?.supportsLatest === undefined || source.supportsLatest ? (
<ContentTypeButton
disabled={!source?.supportsLatest}
variant={contentType === SourceContentType.LATEST ? 'contained' : 'outlined'}
startIcon={<NewReleasesIcon />}
onClick={() => updateContentType(SourceContentType.LATEST)}
>
{t('global.button.latest')}
</ContentTypeButton>
) : null}
<ContentTypeButton
variant={contentType === SourceContentType.FILTER ? 'contained' : 'outlined'}
startIcon={<FilterListIcon />}
Expand Down

0 comments on commit d9d92a7

Please sign in to comment.