mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-01 05:47:10 +01:00
Do not show statistics block while loading
This commit is contained in:
parent
3322b5b4e8
commit
76fee50cd5
@ -600,11 +600,10 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
nSubscribersTextView.setText(nSubscribers);
|
nSubscribersTextView.setText(nSubscribers);
|
||||||
|
|
||||||
if (mCommunityStats != null && showStatistics) {
|
if (mCommunityStats != null && showStatistics) {
|
||||||
|
communityStatisticsBlock.setVisibility(View.VISIBLE);
|
||||||
nActiveUsersTextView.setText(getString(R.string.active_users_number_detail, mCommunityStats.getActiveUsers()));
|
nActiveUsersTextView.setText(getString(R.string.active_users_number_detail, mCommunityStats.getActiveUsers()));
|
||||||
nPostsTextView.setText(getString(R.string.post_count_detail, mCommunityStats.getPosts()));
|
nPostsTextView.setText(getString(R.string.post_count_detail, mCommunityStats.getPosts()));
|
||||||
nCommentsTextView.setText(getString(R.string.comment_count_detail, mCommunityStats.getComments()));
|
nCommentsTextView.setText(getString(R.string.comment_count_detail, mCommunityStats.getComments()));
|
||||||
} else {
|
|
||||||
communityStatisticsBlock.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
description = subredditData.getDescription();
|
description = subredditData.getDescription();
|
||||||
|
|
||||||
|
@ -629,6 +629,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
|||||||
cakedayTextView.setText((String) userData.getCakeday());
|
cakedayTextView.setText((String) userData.getCakeday());
|
||||||
UserStats userStats = mUserData.getStats();
|
UserStats userStats = mUserData.getStats();
|
||||||
if (userStats != null && showStatistics) {
|
if (userStats != null && showStatistics) {
|
||||||
|
userStatisticsBlock.setVisibility(View.VISIBLE);
|
||||||
postCountTextView.setText(String.valueOf(userStats.getPostCount()));
|
postCountTextView.setText(String.valueOf(userStats.getPostCount()));
|
||||||
commentCountTextView.setText(String.valueOf(userStats.getCommentCount()));
|
commentCountTextView.setText(String.valueOf(userStats.getCommentCount()));
|
||||||
if (showScore) {
|
if (showScore) {
|
||||||
@ -640,8 +641,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
|||||||
postUpvoteCountIconImageView.setVisibility(View.GONE);
|
postUpvoteCountIconImageView.setVisibility(View.GONE);
|
||||||
commentUpvoteCountIconImageView.setVisibility(View.GONE);
|
commentUpvoteCountIconImageView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
userStatisticsBlock.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userData.getDescription() == null || userData.getDescription().equals("")) {
|
if (userData.getDescription() == null || userData.getDescription().equals("")) {
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/community_statistics_block_view_subreddit_detail_activity">
|
android:id="@+id/community_statistics_block_view_subreddit_detail_activity">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -86,6 +86,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/user_statistics_block_view_user_detail_activity">
|
android:id="@+id/user_statistics_block_view_user_detail_activity">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -76,11 +76,12 @@
|
|||||||
app:chipStrokeColor="#00000000" />
|
app:chipStrokeColor="#00000000" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/community_statistics_block_view_subreddit_detail_activity"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:id="@+id/community_statistics_block_view_subreddit_detail_activity">
|
android:visibility="gone">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/subscriber_count_image_view_view_subreddit_detail_activity"
|
android:id="@+id/subscriber_count_image_view_view_subreddit_detail_activity"
|
||||||
|
@ -86,6 +86,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/user_statistics_block_view_user_detail_activity">
|
android:id="@+id/user_statistics_block_view_user_detail_activity">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -79,6 +79,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/community_statistics_block_view_subreddit_detail_activity">
|
android:id="@+id/community_statistics_block_view_subreddit_detail_activity">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -86,6 +86,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/user_statistics_block_view_user_detail_activity">
|
android:id="@+id/user_statistics_block_view_user_detail_activity">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
Loading…
Reference in New Issue
Block a user