Merge pull request #420 from lbryio/pre-release-fixes

some tweaks before release
This commit is contained in:
Akinwale Ariwodola 2019-01-31 15:57:02 +01:00 committed by GitHub
commit 4c5558fa29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 11 deletions

View file

@ -32,12 +32,15 @@ class DateTime extends React.PureComponent<Props> {
return date ? <View style={style}><Text style={textStyle}>{moment(date).from(moment())}</Text></View> : null;
}
// TODO: formatOptions not working as expected in RN
// date.toLocaleDateString([locale, 'en-US'], formatOptions)}
return (
<View style={style}>
<Text style={textStyle}>
{date &&
(show === DateTime.SHOW_BOTH || show === DateTime.SHOW_DATE) &&
date.toLocaleDateString([locale, 'en-US'], formatOptions)}
moment(date).format('MMMM D, YYYY')}
{show === DateTime.SHOW_BOTH && ' '}
{date &&
(show === DateTime.SHOW_BOTH || show === DateTime.SHOW_TIME) &&

View file

@ -35,6 +35,8 @@ export default class Link extends React.PureComponent {
render() {
const {
ellipsizeMode,
numberOfLines,
onPress,
style,
text
@ -54,7 +56,13 @@ export default class Link extends React.PureComponent {
}
return (
<Text style={styles} onPress={onPress ? onPress : this.handlePress}>{text}</Text>
<Text
style={styles}
numberOfLines={numberOfLines}
ellipsizeMode={ellipsizeMode}
onPress={onPress ? onPress : this.handlePress}>
{text}
</Text>
);
}
};

View file

@ -20,6 +20,7 @@ import ImageViewer from 'react-native-image-zoom-viewer';
import Button from 'component/button';
import Colors from 'styles/colors';
import ChannelPage from 'page/channel';
import DateTime from 'component/dateTime';
import FileDownloadButton from 'component/fileDownloadButton';
import FileItemMedia from 'component/fileItemMedia';
import FilePrice from 'component/filePrice';
@ -567,13 +568,23 @@ class FilePage extends React.PureComponent {
<Text style={filePageStyle.title} selectable={true}>{title}</Text>
{channelName &&
<View style={filePageStyle.channelRow}>
<Link style={filePageStyle.channelName}
selectable={true}
text={channelName}
onPress={() => {
const channelUri = normalizeURI(channelName);
navigateToUri(navigation, channelUri);
}} />
<View style={filePageStyle.publishInfo}>
<Link style={filePageStyle.channelName}
selectable={true}
text={channelName}
numberOfLines={1}
ellipsizeMode={"tail"}
onPress={() => {
const channelUri = normalizeURI(channelName);
navigateToUri(navigation, channelUri);
}} />
<DateTime
style={filePageStyle.publishDate}
textStyle={filePageStyle.publishDateText}
block={height}
formatOptions={{ day: 'numeric', month: 'long', year: 'numeric' }}
show={DateTime.SHOW_DATE} />
</View>
<View style={filePageStyle.subscriptionRow}>
<SubscribeButton
style={filePageStyle.actionButton}

View file

@ -68,14 +68,25 @@ const filePageStyle = StyleSheet.create({
},
subscriptionRow: {
flexDirection: 'row',
alignSelf: 'flex-end'
marginTop: 8
},
publishInfo: {
width: '50%',
marginTop: 6,
},
channelName: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: 20,
marginTop: 6,
color: Colors.LbryGreen
},
publishDateText: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
color: Colors.DescriptionGrey
},
publishDate: {
marginTop: 4
},
description: {
color: Colors.DescriptionGrey,
fontFamily: 'Inter-UI-Regular',

View file

@ -1,4 +1,5 @@
import keyring
import logging
import platform
from jnius import autoclass
from keyring.backend import KeyringBackend
@ -12,6 +13,7 @@ lbrynet_android_utils = autoclass('io.lbry.browser.Utils')
service = autoclass('io.lbry.browser.LbrynetService').serviceInstance
platform.platform = lambda: 'Android %s (API %s)' % (lbrynet_android_utils.getAndroidRelease(), lbrynet_android_utils.getAndroidSdk())
build_type.BUILD = 'dev' if lbrynet_android_utils.isDebug() else 'release'
log = logging.getLogger(__name__)
# Keyring backend
class LbryAndroidKeyring(KeyringBackend):
@ -55,6 +57,9 @@ def start():
log_support.configure_logging(conf.settings.get_log_filename(), True, [])
log_support.configure_loggly_handler()
log.info('Final Settings: %s', conf.settings.get_current_settings_dict())
log.info('Starting lbrynet-daemon');
if check_connection():
daemon = Daemon()
daemon.start_listening()