From cb4c6e1c4ae086e541aab998e8c5c3ae5d77cf14 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 3 Dec 2019 15:44:24 +0100 Subject: [PATCH 1/2] move file action buttons to large button row --- src/page/discover/view.js | 46 ++------------------------ src/page/file/view.js | 69 +++++++++++++++------------------------ src/styles/filePage.js | 2 +- 3 files changed, 30 insertions(+), 87 deletions(-) diff --git a/src/page/discover/view.js b/src/page/discover/view.js index 96394be..cadd801 100644 --- a/src/page/discover/view.js +++ b/src/page/discover/view.js @@ -87,11 +87,9 @@ class DiscoverPage extends React.PureComponent { } onComponentFocused = () => { - const { fetchSubscriptions, pushDrawerStack } = this.props; + const { pushDrawerStack } = this.props; // pushDrawerStack(); - NativeModules.Firebase.setCurrentScreen('Your tags').then(result => { - fetchSubscriptions(); - }); + NativeModules.Firebase.setCurrentScreen('Your tags'); }; handleSortByItemSelected = item => { @@ -124,46 +122,6 @@ class DiscoverPage extends React.PureComponent { return null; }; - componentDidUpdate(prevProps, prevState) { - const { unreadSubscriptions, enabledChannelNotifications } = this.props; - - const utility = NativeModules.UtilityModule; - const hasUnread = - prevProps.unreadSubscriptions && - prevProps.unreadSubscriptions.length !== unreadSubscriptions.length && - unreadSubscriptions.length > 0; - - if (hasUnread) { - unreadSubscriptions.map(({ channel, uris }) => { - const { claimName: channelName } = parseURI(channel); - - // check if notifications are enabled for the channel - if (enabledChannelNotifications.includes(channelName)) { - uris.forEach(uri => { - Lbry.resolve({ urls: uri }).then(result => { - const sub = result[uri]; - - if (sub && sub.value) { - const { source, title, thumbnail } = sub.value; - const isPlayable = - source && source.media_type && ['audio', 'video'].includes(source.media_type.substring(0, 5)); - if (title) { - utility.showNotificationForContent( - uri, - title, - channelName, - thumbnail ? thumbnail.url : null, - isPlayable - ); - } - } - }); - }); - } - }); - } - } - showRatingReminder = () => { const { ratingReminderDisabled, ratingReminderLastShown, setClientSetting } = this.props; diff --git a/src/page/file/view.js b/src/page/file/view.js index a17f4a0..23cec0e 100644 --- a/src/page/file/view.js +++ b/src/page/file/view.js @@ -818,7 +818,7 @@ class FilePage extends React.PureComponent { {!this.state.fullscreenMode && } {this.state.showWebView && isWebViewable && ( - + )} {this.state.showImageViewer && ( @@ -937,48 +937,8 @@ class FilePage extends React.PureComponent { /> )} - {showActions && showFileActions && ( - - {showFileActions && ( - - {canEdit && ( -