From 92e0c9691f8c2640d4c94669530135b461b86c5f Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 30 Apr 2019 11:02:04 -0400 Subject: [PATCH] fix: app breaking with old 'stream' value --- src/ui/component/fileList/view.jsx | 12 ++++-------- src/ui/redux/actions/publish.js | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/ui/component/fileList/view.jsx b/src/ui/component/fileList/view.jsx index 34a321939..a880acff6 100644 --- a/src/ui/component/fileList/view.jsx +++ b/src/ui/component/fileList/view.jsx @@ -73,15 +73,11 @@ class FileList extends React.PureComponent { [SORT_OPTIONS.TITLE]: fileInfos => fileInfos.slice().sort((fileInfo1, fileInfo2) => { const getFileTitle = fileInfo => { - const { value, metadata, name, claim_name: claimName } = fileInfo; - if (metadata) { - // downloaded claim - return metadata.title || claimName; - } else if (value) { - // published claim - const { title } = value.stream; - return title || name; + const { value, name, claim_name: claimName } = fileInfo; + if (value) { + return value.title || claimName; } + // Invalid claim return ''; }; diff --git a/src/ui/redux/actions/publish.js b/src/ui/redux/actions/publish.js index 39a980957..4fc813da0 100644 --- a/src/ui/redux/actions/publish.js +++ b/src/ui/redux/actions/publish.js @@ -311,7 +311,7 @@ export const doCheckPendingPublishes = () => (dispatch: Dispatch, getState: GetS // If it's confirmed, check if we should notify the user if (selectosNotificationsEnabled(getState())) { const notif = new window.Notification('LBRY Publish Complete', { - body: `${claim.value.stream.title} has been published to lbry://${ + body: `${claim.value.title} has been published to lbry://${ claim.name }. Click here to view it`, silent: false,