aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermes Junior <ohermesjunior@gmail.com>2020-06-12 15:18:40 +0000
committerOHermesJunior <ohermesjunior@gmail.com>2020-06-16 17:29:17 +0000
commite0020e3cf21abe06ca5e6f6456451ccf7b9fd3d1 (patch)
treeaac9c8ddabcc88470c7d59763c6b1a8132de86e2
parent1b972aca2eb20cd7895ba20f015ba480a7f2ade6 (diff)
downloadinfinity-for-reddit-e0020e3cf21abe06ca5e6f6456451ccf7b9fd3d1.tar
infinity-for-reddit-e0020e3cf21abe06ca5e6f6456451ccf7b9fd3d1.tar.gz
infinity-for-reddit-e0020e3cf21abe06ca5e6f6456451ccf7b9fd3d1.tar.bz2
infinity-for-reddit-e0020e3cf21abe06ca5e6f6456451ccf7b9fd3d1.tar.lz
infinity-for-reddit-e0020e3cf21abe06ca5e6f6456451ccf7b9fd3d1.tar.xz
infinity-for-reddit-e0020e3cf21abe06ca5e6f6456451ccf7b9fd3d1.tar.zst
infinity-for-reddit-e0020e3cf21abe06ca5e6f6456451ccf7b9fd3d1.zip
Fix crash for non selftext posts.
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CommentMoreBottomSheetFragment.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java
index 9610d7c1..90bae86e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java
@@ -566,7 +566,7 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS
mMenu.findItem(R.id.action_view_crosspost_parent_view_post_detail_activity).setVisible(mPost.getCrosspostParentId() != null);
- if (mPost.getSelfText().equals("[deleted]")) {
+ if ("[deleted]".equals(mPost.getAuthor()) || "[deleted]".equals(mPost.getSelfText())) {
mMenu.findItem(R.id.action_see_removed_view_post_detail_activity).setVisible(true);
}
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CommentMoreBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CommentMoreBottomSheetFragment.java
index bfdb0b0f..2fa1f3d7 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CommentMoreBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CommentMoreBottomSheetFragment.java
@@ -134,7 +134,7 @@ public class CommentMoreBottomSheetFragment extends RoundedBottomSheetDialogFrag
dismiss();
});
- if (commentData.getCommentRawText().equals("[removed]")) {
+ if ("[removed]".equals(commentData.getCommentRawText())) {
seeRemovedTextView.setVisibility(View.VISIBLE);
seeRemovedTextView.setOnClickListener(view -> {