Add option to disable statistics block and post/comment score

As per users requested, I've added two options to the interface section:
1. Disable statistics (under users and community pages): Disables the statistics block on user/community pages
2. Disable post and comment scores: Disables the post and comment scores show on users pages
This commit is contained in:
Balazs Toldi
2023-08-19 22:25:26 +02:00
parent 0384914c16
commit 3322b5b4e8
11 changed files with 64 additions and 16 deletions

View File

@@ -79,7 +79,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp">
android:layout_marginBottom="16dp"
android:id="@+id/community_statistics_block_view_subreddit_detail_activity">
<ImageView
android:id="@+id/subscriber_count_image_view_view_subreddit_detail_activity"

View File

@@ -85,7 +85,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:id="@+id/user_statistics_block_view_user_detail_activity">
<TextView
android:id="@+id/post_stats_text_view_view_user_detail_activity"

View File

@@ -79,7 +79,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp">
android:layout_marginBottom="16dp"
android:id="@+id/community_statistics_block_view_subreddit_detail_activity">
<ImageView
android:id="@+id/subscriber_count_image_view_view_subreddit_detail_activity"

View File

@@ -85,7 +85,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:id="@+id/user_statistics_block_view_user_detail_activity">
<TextView
android:id="@+id/post_stats_text_view_view_user_detail_activity"

View File

@@ -78,7 +78,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp">
android:layout_marginBottom="16dp"
android:id="@+id/community_statistics_block_view_subreddit_detail_activity">
<ImageView
android:id="@+id/subscriber_count_image_view_view_subreddit_detail_activity"

View File

@@ -85,7 +85,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:id="@+id/user_statistics_block_view_user_detail_activity">
<TextView
android:id="@+id/post_stats_text_view_view_user_detail_activity"

View File

@@ -1372,4 +1372,7 @@
<string name="settings_show_display_name_instead_of_user_name">Show community and user display names</string>
<string name="report_post">Report Post</string>
<string name="send_report">Send Report</string>
<string name="settings_category_community_and_user_pages_title">Community and User pages</string>
<string name="settings_show_statistics">Show Statistics</string>
<string name="settings_show_post_and_comment_score">Show post and comment scores</string>
</resources>

View File

@@ -86,4 +86,16 @@
app:key="show_absolute_number_of_votes"
app:title="@string/settings_show_absolute_number_of_votes_title" />
<eu.toldi.infinityforlemmy.customviews.CustomFontPreferenceCategory app:title="@string/settings_category_community_and_user_pages_title" />
<eu.toldi.infinityforlemmy.customviews.CustomFontSwitchPreference
app:defaultValue="true"
app:key="show_statistics"
app:title="@string/settings_show_statistics" />
<eu.toldi.infinityforlemmy.customviews.CustomFontSwitchPreference
app:defaultValue="true"
app:key="show_score"
app:title="@string/settings_show_post_and_comment_score" />
</PreferenceScreen>