mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-23 03:05:26 +00:00
Add My Story row polish.
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user