fix(profile): double usernames

This commit is contained in:
aayush262 2024-03-20 10:57:50 +05:30
parent 51841cf05f
commit 7d5f69888a
5 changed files with 6 additions and 3 deletions

View file

@ -101,14 +101,14 @@ class CommentItem(val comment: Comment,
ContextCompat.startActivity( ContextCompat.startActivity(
commentsFragment.activity, Intent(commentsFragment.activity, ProfileActivity::class.java) commentsFragment.activity, Intent(commentsFragment.activity, ProfileActivity::class.java)
.putExtra("userId", comment.userId.toInt()) .putExtra("userId", comment.userId.toInt())
.putExtra("username","[${levelColor.second}]"), null .putExtra("userLVL","[${levelColor.second}]"), null
) )
} }
viewBinding.commentUserAvatar.setOnClickListener { viewBinding.commentUserAvatar.setOnClickListener {
ContextCompat.startActivity( ContextCompat.startActivity(
commentsFragment.activity, Intent(commentsFragment.activity, ProfileActivity::class.java) commentsFragment.activity, Intent(commentsFragment.activity, ProfileActivity::class.java)
.putExtra("userId", comment.userId.toInt()) .putExtra("userId", comment.userId.toInt())
.putExtra("username","[${levelColor.second}]"), null .putExtra("userLVL","[${levelColor.second}]"), null
) )
} }
viewBinding.commentText.setOnLongClickListener { viewBinding.commentText.setOnLongClickListener {

View file

@ -102,7 +102,7 @@ class ProfileActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedListene
binding.profileViewPager.setCurrentItem(selected, true) binding.profileViewPager.setCurrentItem(selected, true)
} }
}) })
val userLevel = intent.getStringExtra("username") ?: "" val userLevel = intent.getStringExtra("userLVL") ?: ""
binding.followButton.visibility = binding.followButton.visibility =
if (user.id == Anilist.userid || Anilist.userid == null) View.GONE else View.VISIBLE if (user.id == Anilist.userid || Anilist.userid == null) View.GONE else View.VISIBLE
binding.followButton.text = binding.followButton.text =

View file

@ -114,6 +114,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical" android:layout_gravity="start|center_vertical"
android:backgroundTint="?attr/colorSurface" android:backgroundTint="?attr/colorSurface"
app:strokeColor="@color/transparent"
app:cardCornerRadius="24dp"> app:cardCornerRadius="24dp">
<ImageView <ImageView

View file

@ -12,6 +12,7 @@
android:layout_height="90dp" android:layout_height="90dp"
android:layout_gravity="start|center_vertical" android:layout_gravity="start|center_vertical"
android:backgroundTint="@color/bg_white" android:backgroundTint="@color/bg_white"
app:strokeColor="@color/transparent"
app:cardCornerRadius="24dp"> app:cardCornerRadius="24dp">
<ImageView <ImageView

View file

@ -13,6 +13,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical" android:layout_gravity="start|center_vertical"
app:cardBackgroundColor="@color/nav_bg" app:cardBackgroundColor="@color/nav_bg"
app:strokeColor="@color/transparent"
app:cardCornerRadius="24dp"> app:cardCornerRadius="24dp">
<ImageView <ImageView