Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lbry
lbry-react-native
Commits
3c5dfc98
Commit
3c5dfc98
authored
Mar 02, 2020
by
Akinwale Ariwodola
Browse files
display reposts information
parent
6392dbe9
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/component/fileListItem/view.js
View file @
3c5dfc98
...
...
@@ -99,9 +99,12 @@ class FileListItem extends React.PureComponent {
isRewardContent
,
channelClaimId
,
fullChannelUri
,
repostChannel
,
repostChannelUrl
,
shortChannelUri
,
shouldHide
,
signingChannel
;
signingChannel
,
isRepost
;
if
(
claim
)
{
name
=
claim
.
name
;
signingChannel
=
claim
.
signing_channel
;
...
...
@@ -111,6 +114,12 @@ class FileListItem extends React.PureComponent {
channelClaimId
=
signingChannel
?
signingChannel
.
claim_id
:
null
;
fullChannelUri
=
channelClaimId
?
`
${
channel
}
#
${
channelClaimId
}
`
:
channel
;
shortChannelUri
=
signingChannel
?
signingChannel
.
short_url
:
null
;
repostChannelUrl
=
claim
.
repost_channel_url
;
if
(
repostChannelUrl
)
{
const
{
claimName
:
repostChannelName
}
=
parseURI
(
repostChannelUrl
);
repostChannel
=
repostChannelName
;
}
isRepost
=
!!
repostChannelUrl
;
if
(
blackListedOutpoints
||
filteredOutpoints
)
{
const
outpointsToHide
=
!
blackListedOutpoints
...
...
@@ -127,11 +136,20 @@ class FileListItem extends React.PureComponent {
return
null
;
}
const
actualHideChannel
=
!
isRepost
&&
hideChannel
;
const
isChannel
=
name
&&
name
.
startsWith
(
'
@
'
);
const
hasThumbnail
=
!!
thumbnail
;
return
(
<
View
style
=
{
style
}
>
<
View
>
{
isRepost
&&
(
<
View
style
=
{
fileListStyle
.
repostInfo
}
>
<
Icon
name
=
{
"
retweet
"
}
size
=
{
14
}
style
=
{
fileListStyle
.
repostIcon
}
/
>
<
Text
style
=
{
fileListStyle
.
repostChannelName
}
>
<
Link
text
=
{
repostChannel
}
onPress
=
{()
=>
navigateToUri
(
navigation
,
normalizeURI
(
repostChannelUrl
),
null
,
false
,
null
,
false
)}
/> reposted</
Text
>
<
/View
>
)}
<
TouchableOpacity
style
=
{[
style
,
isChannel
?
fileListStyle
.
channelContainer
:
null
]}
onPress
=
{
this
.
onPressHandler
}
...
...
@@ -212,7 +230,7 @@ class FileListItem extends React.PureComponent {
<
View
style
=
{
fileListStyle
.
titleContainer
}
>
<
Text
style
=
{
featuredResult
?
fileListStyle
.
featuredTitle
:
fileListStyle
.
title
}
numberOfLines
=
{
h
ideChannel
?
4
:
3
}
numberOfLines
=
{
actualH
ideChannel
?
4
:
3
}
>
{
title
||
name
}
<
/Text
>
...
...
@@ -226,7 +244,7 @@ class FileListItem extends React.PureComponent {
<
/View
>
)}
{(
channel
||
isChannel
)
&&
!
h
ideChannel
&&
(
{(
channel
||
isChannel
)
&&
!
actualH
ideChannel
&&
(
<
Link
style
=
{
fileListStyle
.
publisher
}
text
=
{
isChannel
?
name
:
channel
}
...
...
src/styles/claimList.js
View file @
3c5dfc98
...
...
@@ -25,10 +25,10 @@ const claimListStyle = StyleSheet.create({
flex
:
1
,
flexDirection
:
'
row
'
,
justifyContent
:
'
space-between
'
,
marginLeft
:
8
,
marginRight
:
8
,
marginTop
:
4
,
marginBottom
:
4
,
marginLeft
:
16
,
marginRight
:
16
,
marginTop
:
8
,
marginBottom
:
12
,
},
verticalLoading
:
{
width
:
'
100%
'
,
...
...
src/styles/fileList.js
View file @
3c5dfc98
...
...
@@ -165,6 +165,21 @@ const fileListStyle = StyleSheet.create({
marginRight
:
2
,
color
:
'
#0c604b
'
,
},
repostChannelName
:
{
color
:
Colors
.
DescriptionGrey
,
fontFamily
:
'
Inter-Regular
'
,
fontSize
:
14
,
},
repostIcon
:
{
color
:
Colors
.
DescriptionGrey
,
marginRight
:
4
,
},
repostInfo
:
{
marginLeft
:
16
,
marginRight
:
16
,
alignItems
:
'
center
'
,
flexDirection
:
'
row
'
,
},
});
export
default
fileListStyle
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment