fix: reading in manga instead of watching

This commit is contained in:
aayush262 2024-04-22 21:38:46 +05:30
parent c5a03c4455
commit e81773f2b5
3 changed files with 6 additions and 3 deletions

View file

@ -580,7 +580,7 @@ class MediaInfoFragment : Fragment() {
).apply { ).apply {
itemTitle.setText(R.string.social) itemTitle.setText(R.string.social)
itemRecycler.adapter = itemRecycler.adapter =
MediaSocialAdapter(media.users!!) MediaSocialAdapter(media.users!!, type)
itemRecycler.layoutManager = LinearLayoutManager( itemRecycler.layoutManager = LinearLayoutManager(
requireContext(), requireContext(),
LinearLayoutManager.HORIZONTAL, LinearLayoutManager.HORIZONTAL,

View file

@ -9,12 +9,13 @@ import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import ani.dantotsu.R import ani.dantotsu.R
import ani.dantotsu.databinding.ItemFollowerGridBinding import ani.dantotsu.databinding.ItemFollowerGridBinding
import ani.dantotsu.getAppString
import ani.dantotsu.loadImage import ani.dantotsu.loadImage
import ani.dantotsu.profile.ProfileActivity import ani.dantotsu.profile.ProfileActivity
import ani.dantotsu.profile.User import ani.dantotsu.profile.User
import ani.dantotsu.setAnimation import ani.dantotsu.setAnimation
class MediaSocialAdapter(private val user: ArrayList<User>) : class MediaSocialAdapter(private val user: ArrayList<User>, private val type: String) :
RecyclerView.Adapter<MediaSocialAdapter.DeveloperViewHolder>() { RecyclerView.Adapter<MediaSocialAdapter.DeveloperViewHolder>() {
inner class DeveloperViewHolder(val binding: ItemFollowerGridBinding) : inner class DeveloperViewHolder(val binding: ItemFollowerGridBinding) :
@ -39,7 +40,7 @@ class MediaSocialAdapter(private val user: ArrayList<User>) :
profileUserName.text = user.name profileUserName.text = user.name
profileInfo.apply { profileInfo.apply {
text = when (user.status) { text = when (user.status) {
"CURRENT" -> "WATCHING" "CURRENT" -> if (type == "ANIME") getAppString(R.string.watching) else getAppString(R.string.reading)
else -> user.status ?: "" else -> user.status ?: ""
} }
visibility = View.VISIBLE visibility = View.VISIBLE

View file

@ -958,4 +958,6 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
<string name="download_addon_not_found">Download addon not found</string> <string name="download_addon_not_found">Download addon not found</string>
<string name="image">Image</string> <string name="image">Image</string>
<string name="failed_ext_install_conflict">Failed to install extension due to conflict</string> <string name="failed_ext_install_conflict">Failed to install extension due to conflict</string>
<string name="reading">READING</string>
<string name="watching">WATCHING</string>
</resources> </resources>