chore: cleanup

This commit is contained in:
aayush262 2024-04-28 15:23:19 +05:30
parent c947dbdb70
commit a573fbdc89
4 changed files with 75 additions and 96 deletions

View file

@ -62,12 +62,10 @@ class UserStatusAdapter(private val user: ArrayList<User>) :
val user = user[position]
b.profileUserAvatar.loadImage(user.pfp)
b.profileUserName.text = if (Anilist.userid == user.id) getAppString(R.string.your_story) else user.name
val watchedActivity = PrefManager.getCustomVal<Set<Int>>("activities", setOf())
val booleanList = user.activity.map { watchedActivity.contains(it.id) }
b.profileUserStatusIndicator.setParts(user.activity.size, booleanList, user.id == Anilist.userid)
val newList = watchedActivity.sorted().takeLast(100)
PrefManager.setCustomVal("activities",newList.toSet())
}
override fun getItemCount(): Int = user.size