fix(social): activity name
This commit is contained in:
parent
90e611dc4f
commit
140dd2e0c3
1 changed files with 20 additions and 17 deletions
|
@ -372,8 +372,12 @@ constructor(
|
|||
private fun loadStory(story: Activity) {
|
||||
loadingView.visibility = View.GONE
|
||||
animation.start()
|
||||
val bannerAnimations: Boolean = PrefManager.getVal(PrefName.BannerAnimations)
|
||||
|
||||
val key = "${story.user?.id}_activities"
|
||||
val set = PrefManager.getCustomVal<Set<Int>>(key, setOf()).plus((story.id))
|
||||
PrefManager.setCustomVal(key, set)
|
||||
|
||||
val bannerAnimations: Boolean = PrefManager.getVal(PrefName.BannerAnimations)
|
||||
blurImage(if (bannerAnimations)imageContentViewKen else imageContentView, story.media?.bannerImage ?: story.media?.coverImage?.extraLarge)
|
||||
userAvatar.loadImage(story.user?.avatar?.large)
|
||||
coverImage.loadImage(story.media?.coverImage?.extraLarge)
|
||||
|
@ -387,7 +391,7 @@ constructor(
|
|||
it.toString()
|
||||
}
|
||||
}} ${story.progress ?: story.media?.title?.userPreferred} " +
|
||||
if (story.status?.contains("Completed") != false) {
|
||||
if (story.status?.contains("completed") == false) {
|
||||
"of ${story.media?.title?.userPreferred}"
|
||||
}else {
|
||||
""
|
||||
|
@ -406,6 +410,20 @@ constructor(
|
|||
null)
|
||||
}
|
||||
|
||||
|
||||
|
||||
val userList = arrayListOf<User>()
|
||||
story.likes?.forEach { i ->
|
||||
userList.add(User(i.id, i.name.toString(), i.avatar?.medium, i.bannerImage))
|
||||
}
|
||||
activityLikeContainer.setOnLongClickListener {
|
||||
UsersDialogFragment().apply {
|
||||
userList(userList)
|
||||
show(activ.supportFragmentManager, "dialog")
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
val likeColor = ContextCompat.getColor(context, R.color.yt_red)
|
||||
val notLikeColor = ContextCompat.getColor(context, R.color.bg_opp)
|
||||
activityLikeCount.text = story.likeCount.toString()
|
||||
|
@ -431,20 +449,5 @@ constructor(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
val userList = arrayListOf<User>()
|
||||
story.likes?.forEach { i ->
|
||||
userList.add(User(i.id, i.name.toString(), i.avatar?.medium, i.bannerImage))
|
||||
}
|
||||
activityLikeContainer.setOnLongClickListener {
|
||||
UsersDialogFragment().apply {
|
||||
userList(userList)
|
||||
show(activ.supportFragmentManager, "dialog")
|
||||
}
|
||||
true
|
||||
}
|
||||
val key = "${story.user?.id}_activities"
|
||||
val set = PrefManager.getCustomVal<Set<Int>>(key, setOf()).plus((story.id))
|
||||
PrefManager.setCustomVal(key, set)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue