From 53fb0723736e8751ba2eee20328f4496e235fcee Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 26 Mar 2019 15:10:07 +0100 Subject: [PATCH] Collapse description (#490) * collapse file description by default and add display toggle --- .../component/floatingWalletBalance/view.js | 12 ++++++----- app/src/page/file/view.js | 21 +++++++++---------- app/src/styles/filePage.js | 10 +++++++-- app/src/styles/floatingButton.js | 5 +++++ 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/app/src/component/floatingWalletBalance/view.js b/app/src/component/floatingWalletBalance/view.js index be0843f..fed4c24 100644 --- a/app/src/component/floatingWalletBalance/view.js +++ b/app/src/component/floatingWalletBalance/view.js @@ -2,10 +2,11 @@ import React from 'react'; import { ActivityIndicator, Text, TouchableOpacity, View } from 'react-native'; import { formatCredits } from 'lbry-redux' -import Address from '../address'; -import Button from '../button'; -import Colors from '../../styles/colors'; -import floatingButtonStyle from '../../styles/floatingButton'; +import Address from 'component/address'; +import Button from 'component/button'; +import Colors from 'styles/colors'; +import Icon from 'react-native-vector-icons/FontAwesome5'; +import floatingButtonStyle from 'styles/floatingButton'; type Props = { balance: number, @@ -27,7 +28,8 @@ class FloatingWalletBalance extends React.PureComponent { {unclaimedRewardAmount > 0 && navigation && navigation.navigate({ routeName: 'Rewards' })} > - claim {unclaimedRewardAmount} + + {unclaimedRewardAmount} } ); diff --git a/app/src/page/file/view.js b/app/src/page/file/view.js index cc58aec..d63a806 100644 --- a/app/src/page/file/view.js +++ b/app/src/page/file/view.js @@ -16,6 +16,7 @@ import { WebView } from 'react-native'; import { navigateToUri } from 'utils/helper'; +import Icon from 'react-native-vector-icons/FontAwesome5'; import ImageViewer from 'react-native-image-zoom-viewer'; import Button from 'component/button'; import Colors from 'styles/colors'; @@ -62,6 +63,7 @@ class FilePage extends React.PureComponent { mediaLoaded: false, pageSuspended: false, relatedContentY: 0, + showDescription: false, showImageViewer: false, showWebView: false, showTipView: false, @@ -540,15 +542,8 @@ class FilePage extends React.PureComponent { position={position} />} - {showActions && + {(showActions && showFileActions) && - -