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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -570,6 +570,8 @@ class FilePage extends React.PureComponent {
|
||||||
<Link style={filePageStyle.channelName}
|
<Link style={filePageStyle.channelName}
|
||||||
selectable={true}
|
selectable={true}
|
||||||
text={channelName}
|
text={channelName}
|
||||||
|
numberOfLines={1}
|
||||||
|
ellipsizeMode={"tail"}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
const channelUri = normalizeURI(channelName);
|
const channelUri = normalizeURI(channelName);
|
||||||
navigateToUri(navigation, channelUri);
|
navigateToUri(navigation, channelUri);
|
||||||
|
|
|
@ -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