Show approved or removed status in PostOptionsBottomSheetFragment and CommentMoreBottomSheetFragment.

This commit is contained in:
Docile-Alligator 2025-07-29 18:32:59 -04:00
parent 4b7ff707d1
commit e68c6352be
5 changed files with 57 additions and 0 deletions

View File

@ -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);
}

View File

@ -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) {

View File

@ -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>

View File

@ -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>

View File

@ -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>