fix: half cut text story (thanks to shivam)
This commit is contained in:
parent
11655bd38d
commit
6ce41b8fbb
21 changed files with 199 additions and 83 deletions
|
@ -15,6 +15,8 @@ import ani.dantotsu.profile.ProfileActivity
|
|||
import ani.dantotsu.profile.User
|
||||
import ani.dantotsu.setAnimation
|
||||
import ani.dantotsu.settings.saving.PrefManager
|
||||
import ani.dantotsu.snackString
|
||||
import ani.dantotsu.util.MarkdownCreatorActivity
|
||||
|
||||
class UserStatusAdapter(private val user: ArrayList<User>) :
|
||||
RecyclerView.Adapter<UserStatusAdapter.UsersViewHolder>() {
|
||||
|
@ -23,6 +25,10 @@ class UserStatusAdapter(private val user: ArrayList<User>) :
|
|||
RecyclerView.ViewHolder(binding.root) {
|
||||
init {
|
||||
itemView.setOnClickListener {
|
||||
if (user[bindingAdapterPosition].activity.isEmpty()) {
|
||||
snackString("No activity")
|
||||
return@setOnClickListener
|
||||
}
|
||||
StatusActivity.user = user
|
||||
ContextCompat.startActivity(
|
||||
itemView.context,
|
||||
|
@ -34,14 +40,23 @@ class UserStatusAdapter(private val user: ArrayList<User>) :
|
|||
)
|
||||
}
|
||||
itemView.setOnLongClickListener {
|
||||
ContextCompat.startActivity(
|
||||
itemView.context,
|
||||
Intent(
|
||||
if (user[bindingAdapterPosition].id == Anilist.userid) {
|
||||
ContextCompat.startActivity(
|
||||
itemView.context,
|
||||
ProfileActivity::class.java
|
||||
).putExtra("userId", user[bindingAdapterPosition].id),
|
||||
null
|
||||
)
|
||||
Intent(itemView.context, MarkdownCreatorActivity::class.java)
|
||||
.putExtra("type", "activity"),
|
||||
null
|
||||
)
|
||||
}else{
|
||||
ContextCompat.startActivity(
|
||||
itemView.context,
|
||||
Intent(
|
||||
itemView.context,
|
||||
ProfileActivity::class.java
|
||||
).putExtra("userId", user[bindingAdapterPosition].id),
|
||||
null
|
||||
)
|
||||
}
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue