diff --git a/src/component/channelIconItem/view.js b/src/component/channelIconItem/view.js index 89b8943..bf6dbdb 100644 --- a/src/component/channelIconItem/view.js +++ b/src/component/channelIconItem/view.js @@ -51,7 +51,7 @@ export default class ChannelIconItem extends React.PureComponent { {isResolvingUri && ( - + )} ch.name) : [] + channels ? channels.map(ch => ch.name) : [], ); const { @@ -264,7 +264,7 @@ export default class ChannelSelector extends React.PureComponent { - {creatingChannel && } + {creatingChannel && } {!creatingChannel && ( diff --git a/src/component/suggestedSubscriptionItem/view.js b/src/component/suggestedSubscriptionItem/view.js index 5f7e37c..8f8446c 100644 --- a/src/component/suggestedSubscriptionItem/view.js +++ b/src/component/suggestedSubscriptionItem/view.js @@ -43,7 +43,7 @@ class SuggestedSubscriptionItem extends React.PureComponent { if (isResolvingUri) { return ( - + ); } diff --git a/src/page/file/view.js b/src/page/file/view.js index d1887a7..c682785 100644 --- a/src/page/file/view.js +++ b/src/page/file/view.js @@ -9,6 +9,7 @@ import { Image, Linking, NativeModules, + Platform, ScrollView, StatusBar, StyleSheet, @@ -185,7 +186,7 @@ class FilePage extends React.PureComponent { if (purchaseUriErrorMessage && purchaseUriErrorMessage.trim().length > 0) { notify({ message: purchaseUriErrorMessage, isError: true }); } - this.setState({ downloadPressed: false, fileViewLogged: false, mediaLoaded: false }); + this.setState({ downloadPressed: false, fileViewLogged: false, mediaLoaded: false, showRecommended: true }); } const mediaType = Lbry.getMediaType(contentType); @@ -261,7 +262,7 @@ class FilePage extends React.PureComponent { this.setState({ autoGetAttempted: true }, () => this.checkStoragePermissionForDownload()); } - if (((costInfo && costInfo.cost > 0) || !isPlayable) && !this.state.showRecommended) { + if (((costInfo && costInfo.cost > 0) || !isPlayable) && (!fileInfo && !isViewable) && !this.state.showRecommended) { this.setState({ showRecommended: true }); } @@ -620,13 +621,13 @@ class FilePage extends React.PureComponent { confirmPurchaseUri = (uri, costInfo, download) => { const { notify, purchaseUri, title } = this.props; - const { cost } = costInfo; - if (!costInfo) { notify({ message: __('This content cannot be viewed at this time. Please try again in a bit.'), isError: true }); + this.fetchCostInfo(uri, this.props); return; } + const { cost } = costInfo; if (costInfo.cost > 0) { Alert.alert( __('Confirm Purchase'), @@ -763,6 +764,7 @@ class FilePage extends React.PureComponent { }, ], showImageViewer: true, + showRecommended: true, }, () => pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW), ); @@ -774,6 +776,7 @@ class FilePage extends React.PureComponent { this.setState( { showWebView: true, + showRecommended: true, }, () => { pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW); @@ -815,21 +818,40 @@ class FilePage extends React.PureComponent { const localFileUri = this.localUriForFileInfo(fileInfo); if (['text/markdown', 'text/md'].includes(contentType)) { - const html = - '' + - '' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - '
' + - ' ' + - ''; + let fontdecl = ''; + if (Platform.OS === 'android') { + fontdecl = ` + @font-face { + font-family: 'Inter'; + src: url('file:///android_asset/fonts/Inter-Regular.otf'); + font-weight: normal; + } + @font-face { + font-family: 'Inter; + src: url('file:///android_asset/fonts/Inter-Bold.otf'); + font-weight: bold; + } + `; + } + + const html = ` + + + + + + + + +
+ + + `; + return { html }; } diff --git a/src/styles/uriBar.js b/src/styles/uriBar.js index 9284df8..61e430d 100644 --- a/src/styles/uriBar.js +++ b/src/styles/uriBar.js @@ -31,7 +31,6 @@ const uriBarStyle = StyleSheet.create({ paddingRight: 12, fontFamily: 'Inter-Regular', fontSize: 16, - height: 44, lineHeight: 18, flex: 17, },