Skip to content

Commit

Permalink
Parse hyperlinks only for entries in the Links section
Browse files Browse the repository at this point in the history
- See issue #1 (#1)
  • Loading branch information
mshmoustafa committed May 29, 2019
1 parent 94480e0 commit a050431
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion screens/DetailScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ export default class DetailScreen extends React.Component {
}

_renderItem = ({item}) => {
let bodyWithParsedLinks = Utility.convertLinksToTextLinks(item.body, this.linkTapped);
let bodyWithParsedLinks = [];
if (this.props.navigation.getParam("property") === "link") {
bodyWithParsedLinks = Utility.convertLinksToTextLinks(item.body, this.linkTapped);
} else {
bodyWithParsedLinks = [item.body];
}
let bodyWithParsedLinksAndSequences = [];
bodyWithParsedLinks.forEach(element => {
if (typeof element === "string") {
Expand Down

0 comments on commit a050431

Please sign in to comment.