Remove score from user pages

This has been removed from lemmy. No longer needed.
This commit is contained in:
Balazs Toldi 2024-06-30 11:32:33 +02:00
parent 1276435494
commit b0cbecbdc5
4 changed files with 15 additions and 110 deletions

View File

@ -189,21 +189,11 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
@BindView(R.id.comment_count_text_view_view_user_detail_activity)
TextView commentCountTextView;
@BindView(R.id.upvote_count_post_text_view_view_user_detail_activity)
TextView upvoteCountPostTextView;
@BindView(R.id.upvote_count_comment_text_view_view_user_detail_activity)
TextView upvoteCountCommentTextView;
@BindView(R.id.posts_count_icon_image_view_view_user_detail_activity)
ImageView postsCountIconImageView;
@BindView(R.id.comments_count_icon_image_view_view_user_detail_activity)
ImageView commentsCountIconImageView;
@BindView(R.id.upvote_count_posts_icon_image_view_view_user_detail_activity)
ImageView postUpvoteCountIconImageView;
@BindView(R.id.upvote_count_comments_icon_image_view_view_user_detail_activity)
ImageView commentUpvoteCountIconImageView;
@BindView(R.id.account_created_cake_icon_image_view_view_user_detail_activity)
ImageView accountCreatedCakeIconImageView;
@ -262,7 +252,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
private String description;
private boolean showStatistics;
private boolean showScore;
private boolean subscriptionReady = false;
private boolean mFetchUserInfoSuccess = false;
private int expandedTabTextColor;
@ -328,7 +317,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
lockBottomAppBar = mSharedPreferences.getBoolean(SharedPreferencesUtils.LOCK_BOTTOM_APP_BAR, false);
showStatistics = mSharedPreferences.getBoolean(SharedPreferencesUtils.SHOW_STATISTICS, true);
showScore = mSharedPreferences.getBoolean(SharedPreferencesUtils.SHOW_POST_AND_COMMENT_SCORE, true);
if (savedInstanceState == null) {
mMessageId = getIntent().getIntExtra(EXTRA_MESSAGE_FULLNAME, 0);
@ -631,17 +619,8 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
UserStats userStats = mUserData.getStats();
if (userStats != null && showStatistics) {
userStatisticsBlock.setVisibility(View.VISIBLE);
postCountTextView.setText(String.valueOf(userStats.getPostCount()));
commentCountTextView.setText(String.valueOf(userStats.getCommentCount()));
if (showScore) {
upvoteCountPostTextView.setText(String.valueOf(userStats.getPostScore()));
upvoteCountCommentTextView.setText(String.valueOf(userStats.getCommentScore()));
} else {
upvoteCountPostTextView.setVisibility(View.GONE);
upvoteCountCommentTextView.setVisibility(View.GONE);
postUpvoteCountIconImageView.setVisibility(View.GONE);
commentUpvoteCountIconImageView.setVisibility(View.GONE);
}
postCountTextView.setText(getString(R.string.post_count_detail, userStats.getPostCount()));
commentCountTextView.setText(getString(R.string.comment_count_detail, userStats.getCommentCount()));
}
if (userData.getDescription() == null || userData.getDescription().equals("")) {
@ -711,9 +690,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
subscribedColor = mCustomThemeWrapper.getSubscribed();
userNameTextView.setTextColor(mCustomThemeWrapper.getUsername());
postCountTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
upvoteCountPostTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
commentCountTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
upvoteCountCommentTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
postsCountIconImageView.setColorFilter(mCustomThemeWrapper.getPrimaryTextColor(), PorterDuff.Mode.SRC_IN);
commentsCountIconImageView.setColorFilter(mCustomThemeWrapper.getPrimaryTextColor(), PorterDuff.Mode.SRC_IN);
accountCreatedCakeIconImageView.setColorFilter(mCustomThemeWrapper.getPrimaryTextColor(), PorterDuff.Mode.SRC_IN);
@ -726,9 +703,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
if (typeface != null) {
userNameTextView.setTypeface(typeface);
postCountTextView.setTypeface(typeface);
upvoteCountPostTextView.setTypeface(typeface);
commentCountTextView.setTypeface(typeface);
upvoteCountCommentTextView.setTypeface(typeface);
cakedayTextView.setTypeface(typeface);
subscribeUserChip.setTypeface(typeface);
descriptionTextView.setTypeface(typeface);

View File

@ -420,7 +420,6 @@ public class SharedPreferencesUtils {
public static final String ACCOUNT_QUALIFIED_NAME = "account_qualified_name";
public static final String CAN_DOWNVOTE = "can_downvote";
public static final String SHOW_STATISTICS = "show_statistics";
public static final String SHOW_POST_AND_COMMENT_SCORE = "show_score";
public static final String SHARE_LINK_ON_LOCAL_INSTANCE = "share_link_on_local_instance";

View File

@ -84,20 +84,11 @@
app:chipStrokeColor="#00000000" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/user_statistics_block_view_user_detail_activity"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:id="@+id/user_statistics_block_view_user_detail_activity">
android:visibility="gone">
<TextView
android:id="@+id/post_stats_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/posts"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/posts_count_icon_image_view_view_user_detail_activity"
@ -106,7 +97,8 @@
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_post_add_24" />
<TextView
@ -114,30 +106,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:layout_marginTop="10dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/posts_count_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity" />
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/upvote_count_posts_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/post_count_text_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_arrow_upward_black_24dp" />
<TextView
android:id="@+id/upvote_count_post_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/upvote_count_posts_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline3"
@ -146,22 +119,13 @@
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<TextView
android:id="@+id/comment_stats_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/comments"
app:layout_constraintStart_toStartOf="@+id/guideline3"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/comments_count_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="@+id/guideline3"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_comment_black_24" />
<TextView
@ -169,49 +133,20 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:layout_marginTop="10dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/comments_count_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity" />
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/upvote_count_comments_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/comment_count_text_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_arrow_upward_black_24dp" />
<TextView
android:id="@+id/upvote_count_comment_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/upvote_count_comments_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity" />
<TextView
android:id="@+id/account_created_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:text="Account Created"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/posts_count_icon_image_view_view_user_detail_activity" />
<ImageView
android:id="@+id/account_created_cake_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginTop="24dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/account_created_text_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/posts_count_icon_image_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_cake_24" />
<TextView
@ -219,9 +154,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="11dp"
android:layout_marginTop="30dp"
app:layout_constraintStart_toEndOf="@+id/account_created_cake_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/account_created_text_view_view_user_detail_activity" />
app:layout_constraintTop_toBottomOf="@+id/post_count_text_view_view_user_detail_activity" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView

View File

@ -93,9 +93,5 @@
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>