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) {
|
private fun loadStory(story: Activity) {
|
||||||
loadingView.visibility = View.GONE
|
loadingView.visibility = View.GONE
|
||||||
animation.start()
|
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)
|
blurImage(if (bannerAnimations)imageContentViewKen else imageContentView, story.media?.bannerImage ?: story.media?.coverImage?.extraLarge)
|
||||||
userAvatar.loadImage(story.user?.avatar?.large)
|
userAvatar.loadImage(story.user?.avatar?.large)
|
||||||
coverImage.loadImage(story.media?.coverImage?.extraLarge)
|
coverImage.loadImage(story.media?.coverImage?.extraLarge)
|
||||||
|
@ -387,7 +391,7 @@ constructor(
|
||||||
it.toString()
|
it.toString()
|
||||||
}
|
}
|
||||||
}} ${story.progress ?: story.media?.title?.userPreferred} " +
|
}} ${story.progress ?: story.media?.title?.userPreferred} " +
|
||||||
if (story.status?.contains("Completed") != false) {
|
if (story.status?.contains("completed") == false) {
|
||||||
"of ${story.media?.title?.userPreferred}"
|
"of ${story.media?.title?.userPreferred}"
|
||||||
}else {
|
}else {
|
||||||
""
|
""
|
||||||
|
@ -406,6 +410,20 @@ constructor(
|
||||||
null)
|
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 likeColor = ContextCompat.getColor(context, R.color.yt_red)
|
||||||
val notLikeColor = ContextCompat.getColor(context, R.color.bg_opp)
|
val notLikeColor = ContextCompat.getColor(context, R.color.bg_opp)
|
||||||
activityLikeCount.text = story.likeCount.toString()
|
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