From e3bb5d0fb5e64205c2c3a8f74f5c65dae4654096 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Wed, 30 Jan 2019 19:39:23 +0100 Subject: [PATCH 1/3] truncate long channel names on file page --- app/src/component/link/view.js | 10 +++++++++- app/src/page/file/view.js | 14 ++++++++------ app/src/styles/filePage.js | 1 + 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/src/component/link/view.js b/app/src/component/link/view.js index d0d73487..af1b78dd 100644 --- a/app/src/component/link/view.js +++ b/app/src/component/link/view.js @@ -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} + + {text} + ); } }; diff --git a/app/src/page/file/view.js b/app/src/page/file/view.js index b30ab0c6..59f605a0 100644 --- a/app/src/page/file/view.js +++ b/app/src/page/file/view.js @@ -568,12 +568,14 @@ class FilePage extends React.PureComponent { {channelName && { - const channelUri = normalizeURI(channelName); - navigateToUri(navigation, channelUri); - }} /> + selectable={true} + text={channelName} + numberOfLines={1} + ellipsizeMode={"tail"} + onPress={() => { + const channelUri = normalizeURI(channelName); + navigateToUri(navigation, channelUri); + }} /> Date: Wed, 30 Jan 2019 20:31:22 +0100 Subject: [PATCH 2/3] display publish date on file page --- app/src/component/dateTime/view.js | 5 ++++- app/src/page/file/view.js | 27 ++++++++++++++++++--------- app/src/styles/filePage.js | 16 +++++++++++++--- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/app/src/component/dateTime/view.js b/app/src/component/dateTime/view.js index 0261b81a..47eb5ea1 100644 --- a/app/src/component/dateTime/view.js +++ b/app/src/component/dateTime/view.js @@ -32,12 +32,15 @@ class DateTime extends React.PureComponent { return date ? {moment(date).from(moment())} : null; } + // TODO: formatOptions not working as expected in RN + // date.toLocaleDateString([locale, 'en-US'], formatOptions)} + return ( {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) && diff --git a/app/src/page/file/view.js b/app/src/page/file/view.js index 59f605a0..ca4d49c9 100644 --- a/app/src/page/file/view.js +++ b/app/src/page/file/view.js @@ -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,15 +568,23 @@ class FilePage extends React.PureComponent { {title} {channelName && - { - const channelUri = normalizeURI(channelName); - navigateToUri(navigation, channelUri); - }} /> + + { + const channelUri = normalizeURI(channelName); + navigateToUri(navigation, channelUri); + }} /> + + Date: Thu, 31 Jan 2019 00:55:37 +0100 Subject: [PATCH 3/3] log final settings --- src/main/python/lbrynetservice.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/python/lbrynetservice.py b/src/main/python/lbrynetservice.py index c8b46ce3..96bcf377 100644 --- a/src/main/python/lbrynetservice.py +++ b/src/main/python/lbrynetservice.py @@ -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()