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() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
ellipsizeMode,
|
||||||
|
numberOfLines,
|
||||||
onPress,
|
onPress,
|
||||||
style,
|
style,
|
||||||
text
|
text
|
||||||
|
@ -54,7 +56,13 @@ export default class Link extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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 &&
|
{channelName &&
|
||||||
<View style={filePageStyle.channelRow}>
|
<View style={filePageStyle.channelRow}>
|
||||||
<Link style={filePageStyle.channelName}
|
<Link style={filePageStyle.channelName}
|
||||||
selectable={true}
|
selectable={true}
|
||||||
text={channelName}
|
text={channelName}
|
||||||
onPress={() => {
|
numberOfLines={1}
|
||||||
const channelUri = normalizeURI(channelName);
|
ellipsizeMode={"tail"}
|
||||||
navigateToUri(navigation, channelUri);
|
onPress={() => {
|
||||||
}} />
|
const channelUri = normalizeURI(channelName);
|
||||||
|
navigateToUri(navigation, channelUri);
|
||||||
|
}} />
|
||||||
<View style={filePageStyle.subscriptionRow}>
|
<View style={filePageStyle.subscriptionRow}>
|
||||||
<SubscribeButton
|
<SubscribeButton
|
||||||
style={filePageStyle.actionButton}
|
style={filePageStyle.actionButton}
|
||||||
|
|
|
@ -74,6 +74,7 @@ const filePageStyle = StyleSheet.create({
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginTop: 6,
|
marginTop: 6,
|
||||||
|
width: '49%',
|
||||||
color: Colors.LbryGreen
|
color: Colors.LbryGreen
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
|
|
Loading…
Reference in a new issue