Add My Story row polish.

This commit is contained in:
Alex Hart
2022-08-16 09:43:25 -03:00
parent 8d4f87641d
commit 01e4a7fd79
4 changed files with 10 additions and 33 deletions

View File

@@ -19,22 +19,17 @@ object MyStoriesItem {
}
class Model(
val onClick: () -> Unit,
val onClickThumbnail: () -> Unit
val onClick: () -> Unit
) : PreferenceModel<Model>() {
override fun areItemsTheSame(newItem: Model): Boolean = true
}
private class ViewHolder(itemView: View) : MappingViewHolder<Model>(itemView) {
private val thumbnail: View = itemView.findViewById(R.id.story)
private val avatarView: AvatarView = itemView.findViewById(R.id.avatar)
override fun bind(model: Model) {
itemView.setOnClickListener { model.onClick() }
thumbnail.setOnClickListener { model.onClickThumbnail() }
avatarView.setOnClickListener { model.onClickThumbnail() }
avatarView.displayProfileAvatar(Recipient.self())
}
}

View File

@@ -172,9 +172,6 @@ class StoriesLandingFragment : DSLSettingsFragment(layoutId = R.layout.stories_l
customPref(
MyStoriesItem.Model(
onClick = {
startActivityIfAble(Intent(requireContext(), MyStoriesActivity::class.java))
},
onClickThumbnail = {
cameraFab.performClick()
}
)