mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit.git
synced 2025-10-29 11:35:08 +00:00
Show approved or removed status in PostOptionsBottomSheetFragment and CommentMoreBottomSheetFragment.
This commit is contained in:
parent
4b7ff707d1
commit
e68c6352be
@ -226,6 +226,18 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott
|
||||
});
|
||||
}
|
||||
|
||||
if (comment.isApproved()) {
|
||||
binding.statusCommentMoreBottomSheetFragment.setText(getString(R.string.approved_status, comment.getApprovedBy()));
|
||||
} else if (comment.isRemoved()) {
|
||||
if (comment.isSpam()) {
|
||||
binding.statusCommentMoreBottomSheetFragment.setText(R.string.comment_spam_status);
|
||||
} else {
|
||||
binding.statusCommentMoreBottomSheetFragment.setText(R.string.comment_removed_status);
|
||||
}
|
||||
} else {
|
||||
binding.statusCommentMoreBottomSheetFragment.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (activity.typeface != null) {
|
||||
Utils.setFontToAllTextViews(binding.getRoot(), activity.typeface);
|
||||
}
|
||||
|
||||
@ -292,6 +292,18 @@ public class PostOptionsBottomSheetFragment extends LandscapeExpandedRoundedBott
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (mPost.isApproved()) {
|
||||
binding.statusTextViewPostOptionsBottomSheetFragment.setText(getString(R.string.approved_status, mPost.getApprovedBy()));
|
||||
} else if (mPost.isRemoved()) {
|
||||
if (mPost.isSpam()) {
|
||||
binding.statusTextViewPostOptionsBottomSheetFragment.setText(R.string.post_spam_status);
|
||||
} else {
|
||||
binding.statusTextViewPostOptionsBottomSheetFragment.setText(R.string.post_removed_status);
|
||||
}
|
||||
} else {
|
||||
binding.statusTextViewPostOptionsBottomSheetFragment.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
if (mBaseActivity.typeface != null) {
|
||||
|
||||
@ -245,6 +245,20 @@
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?attr/primaryTextColor" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/status_comment_more_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:focusable="true"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:textColor="?attr/secondaryTextColor"
|
||||
android:textSize="?attr/font_default" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
@ -197,6 +197,20 @@
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?attr/primaryTextColor" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/status_text_view_post_options_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:focusable="true"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:textColor="?attr/secondaryTextColor"
|
||||
android:textSize="?attr/font_default" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
@ -1573,4 +1573,9 @@
|
||||
<string name="distinguish_as_mod_failed">Distinguish as moderator failed</string>
|
||||
<string name="undistinguished_as_mod">Undistinguished as moderator</string>
|
||||
<string name="undistinguish_as_mod_failed">Undistinguish as moderator failed</string>
|
||||
<string name="approved_status">Approved by %1$s</string>
|
||||
<string name="post_removed_status">This post is removed</string>
|
||||
<string name="post_spam_status">This post is removed as spam</string>
|
||||
<string name="comment_removed_status">This comment is removed</string>
|
||||
<string name="comment_spam_status">This comment is removed as spam</string>
|
||||
</resources>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user