truncate long channel names on file page
This commit is contained in:
parent
2da930cd41
commit
e3bb5d0fb5
3 changed files with 18 additions and 7 deletions
|
@ -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>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -568,12 +568,14 @@ class FilePage extends React.PureComponent {
|
|||
{channelName &&
|
||||
<View style={filePageStyle.channelRow}>
|
||||
<Link style={filePageStyle.channelName}
|
||||
selectable={true}
|
||||
text={channelName}
|
||||
onPress={() => {
|
||||
const channelUri = normalizeURI(channelName);
|
||||
navigateToUri(navigation, channelUri);
|
||||
}} />
|
||||
selectable={true}
|
||||
text={channelName}
|
||||
numberOfLines={1}
|
||||
ellipsizeMode={"tail"}
|
||||
onPress={() => {
|
||||
const channelUri = normalizeURI(channelName);
|
||||
navigateToUri(navigation, channelUri);
|
||||
}} />
|
||||
<View style={filePageStyle.subscriptionRow}>
|
||||
<SubscribeButton
|
||||
style={filePageStyle.actionButton}
|
||||
|
|
|
@ -74,6 +74,7 @@ const filePageStyle = StyleSheet.create({
|
|||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 20,
|
||||
marginTop: 6,
|
||||
width: '49%',
|
||||
color: Colors.LbryGreen
|
||||
},
|
||||
description: {
|
||||
|
|
Loading…
Reference in a new issue