fixes as per review
This commit is contained in:
parent
015889e035
commit
fc30e8575c
1 changed files with 3 additions and 5 deletions
|
@ -138,17 +138,15 @@ class DiscoverPage extends React.PureComponent {
|
||||||
const { claimName: channelName } = parseURI(channel);
|
const { claimName: channelName } = parseURI(channel);
|
||||||
|
|
||||||
// check if notifications are enabled for the channel
|
// check if notifications are enabled for the channel
|
||||||
if (enabledChannelNotifications.indexOf(channelName) > -1) {
|
if (enabledChannelNotifications.includes(channelName)) {
|
||||||
uris.forEach(uri => {
|
uris.forEach(uri => {
|
||||||
Lbry.resolve({ urls: uri }).then(result => {
|
Lbry.resolve({ urls: uri }).then(result => {
|
||||||
const sub = result[uri];
|
const sub = result[uri];
|
||||||
|
|
||||||
if (sub && sub.value) {
|
if (sub && sub.value) {
|
||||||
let isPlayable = false;
|
|
||||||
const { source, title, thumbnail } = sub.value;
|
const { source, title, thumbnail } = sub.value;
|
||||||
if (source) {
|
const isPlayable =
|
||||||
isPlayable = source.media_type && ['audio', 'video'].indexOf(source.media_type.substring(0, 5)) > -1;
|
source && source.media_type && ['audio', 'video'].includes(source.media_type.substring(0, 5));
|
||||||
}
|
|
||||||
if (title) {
|
if (title) {
|
||||||
utility.showNotificationForContent(
|
utility.showNotificationForContent(
|
||||||
uri,
|
uri,
|
||||||
|
|
Loading…
Reference in a new issue