Skip to content

Commit

Permalink
Replace old checks for self-text on a post with new convenience function
Browse files Browse the repository at this point in the history
  • Loading branch information
Cguy7777 committed Jul 5, 2023
1 parent eeb0b9b commit ca273ac
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -730,8 +730,7 @@ object RedditPostActions {
menu.add(RPVMenuItem(activity, R.string.action_external, Action.EXTERNAL))
}
if (itemPref.contains(Action.SELFTEXT_LINKS)
&& post.src.rawSelfTextMarkdown != null
&& post.src.rawSelfTextMarkdown.length > 1) {
&& post.src.hasSelfText()) {
menu.add(RPVMenuItem(activity, R.string.action_selftext_links, Action.SELFTEXT_LINKS))
}
if (itemPref.contains(Action.SAVE_IMAGE) && post.mIsProbablyAnImage) {
Expand Down Expand Up @@ -853,7 +852,7 @@ object RedditPostActions {
if (itemPref.contains(Action.COPY)) {
menu.add(RPVMenuItem(activity, R.string.action_copy_link, Action.COPY))
}
if (itemPref.contains(Action.COPY_SELFTEXT) && post.src.rawSelfTextMarkdown != null && post.src.rawSelfTextMarkdown.length > 1) {
if (itemPref.contains(Action.COPY_SELFTEXT) && post.src.hasSelfText()) {
menu.add(
RPVMenuItem(
activity,
Expand Down

0 comments on commit ca273ac

Please sign in to comment.