Merge pull request #2263 from lbryio/file-fix

fix: show 'no preview available' for files correctly
This commit is contained in:
Sean Yesmunt 2019-02-04 17:01:39 -05:00 committed by GitHub
commit eaf9968b2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -283,8 +283,8 @@ class MediaPlayer extends React.PureComponent {
const isLoadingFile = !fileSource && isFileType;
const isLbryPackage = /application\/x(-ext)?-lbry$/.test(contentType);
const isUnsupported =
!isLbryPackage && (!this.supportedType() && !isFileType && !isPlayableType);
(mediaType === 'application' && !isLbryPackage) ||
(!this.supportedType() && !isFileType && !isPlayableType);
// Media (audio, video)
const isUnplayable = isPlayableType && unplayable;
const isLoadingMetadata = isPlayableType && (!hasMetadata && !unplayable);

View file

@ -118,7 +118,6 @@ export const selectNavLinks = createSelector(
page === PAGES.WALLET ||
page === PAGES.SEND ||
page === PAGES.GET_CREDITS ||
page === PAGES.REWARDS ||
page === PAGES.HISTORY ||
page === PAGES.BACKUP;
@ -177,9 +176,6 @@ export const selectNavLinks = createSelector(
{
...buildLink('Get Credits', PAGES.GET_CREDITS),
},
{
...buildLink('Rewards', PAGES.REWARDS),
},
{
...buildLink('Backup', PAGES.BACKUP),
},
@ -208,6 +204,11 @@ export const selectNavLinks = createSelector(
...buildLink('Invite', PAGES.INVITE),
icon: ICONS.INVITE,
},
{
...buildLink('Rewards', PAGES.REWARDS),
// This probably shouldn't use the "FEATURED" icon, but not sure what else to use
icon: ICONS.FEATURED,
},
{
...buildLink('Downloads', PAGES.DOWNLOADED),
icon: ICONS.LOCAL,