diff --git a/app/src/component/fileItem/view.js b/app/src/component/fileItem/view.js index 4e418bdb..1743e5b2 100644 --- a/app/src/component/fileItem/view.js +++ b/app/src/component/fileItem/view.js @@ -4,6 +4,7 @@ import { NavigationActions } from 'react-navigation'; import { NativeModules, Text, View, TouchableOpacity } from 'react-native'; import FileItemMedia from '../fileItemMedia'; import FilePrice from '../filePrice'; +import Link from '../link'; import NsfwOverlay from '../nsfwOverlay'; import discoverStyle from '../../styles/discover'; @@ -68,7 +69,10 @@ class FileItem extends React.PureComponent { {title} {channelName && - {channelName}} + { + const channelUri = normalizeURI(channelName); + navigation.navigate({ routeName: 'File', key: channelUri, params: { uri: channelUri }}); + }} />} {obscureNsfw && navigation.navigate('Settings')} />} diff --git a/app/src/page/file/view.js b/app/src/page/file/view.js index 4d7cac37..d5dac95e 100644 --- a/app/src/page/file/view.js +++ b/app/src/page/file/view.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Lbry } from 'lbry-redux'; +import { Lbry, normalizeURI } from 'lbry-redux'; import { ActivityIndicator, Alert, @@ -141,7 +141,7 @@ class FilePage extends React.PureComponent { let tokens = line.split(/\s/g); let lineContent = tokens.length === 0 ? '' : tokens.map((token, j) => { let hasSpace = j !== (tokens.length - 1); - let maybeSpace = hasSpace ? ' ' : ''; + let space = hasSpace ? ' ' : ''; if (token.match(/^(lbry|https?):\/\//g)) { return ( @@ -151,7 +151,7 @@ class FilePage extends React.PureComponent { text={token} /> ); } else { - return token + maybeSpace; + return token + space; } }); @@ -274,7 +274,13 @@ class FilePage extends React.PureComponent { } {title} - {channelName && {channelName}} + {channelName && { + const channelUri = normalizeURI(channelName); + navigation.navigate({ routeName: 'File', key: channelUri, params: { uri: channelUri }}); + }} />} {description && {this.linkify(description)}} diff --git a/app/src/styles/discover.js b/app/src/styles/discover.js index 2d04307a..96c9b6aa 100644 --- a/app/src/styles/discover.js +++ b/app/src/styles/discover.js @@ -42,11 +42,11 @@ const discoverStyle = StyleSheet.create({ fileItemName: { fontFamily: 'Metropolis-Bold', marginTop: 8, - fontSize: 16 + fontSize: 18 }, channelName: { fontFamily: 'Metropolis-SemiBold', - fontSize: 14, + fontSize: 16, marginTop: 4, color: '#c0c0c0' },