kopia lustrzana https://github.com/ryukoposting/Signal-Android
Prevent scrolling when context menu is showing on story landing page.
rodzic
0fe6538ce4
commit
dd3bad858d
|
@ -279,6 +279,12 @@ class StoriesLandingFragment : DSLSettingsFragment(layoutId = R.layout.stories_l
|
||||||
},
|
},
|
||||||
onAvatarClick = {
|
onAvatarClick = {
|
||||||
cameraFab.performClick()
|
cameraFab.performClick()
|
||||||
|
},
|
||||||
|
onLockList = {
|
||||||
|
recyclerView?.suppressLayout(true)
|
||||||
|
},
|
||||||
|
onUnlockList = {
|
||||||
|
recyclerView?.suppressLayout(false)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,9 @@ object StoriesLandingItem {
|
||||||
val onGoToChat: (Model) -> Unit,
|
val onGoToChat: (Model) -> Unit,
|
||||||
val onSave: (Model) -> Unit,
|
val onSave: (Model) -> Unit,
|
||||||
val onDeleteStory: (Model) -> Unit,
|
val onDeleteStory: (Model) -> Unit,
|
||||||
val onInfo: (Model, View) -> Unit
|
val onInfo: (Model, View) -> Unit,
|
||||||
|
val onLockList: () -> Unit,
|
||||||
|
val onUnlockList: () -> Unit
|
||||||
) : MappingModel<Model> {
|
) : MappingModel<Model> {
|
||||||
override fun areItemsTheSame(newItem: Model): Boolean {
|
override fun areItemsTheSame(newItem: Model): Boolean {
|
||||||
return data.storyRecipient.id == newItem.data.storyRecipient.id
|
return data.storyRecipient.id == newItem.data.storyRecipient.id
|
||||||
|
@ -294,7 +296,11 @@ object StoriesLandingItem {
|
||||||
|
|
||||||
private fun displayContext(model: Model) {
|
private fun displayContext(model: Model) {
|
||||||
itemView.isSelected = true
|
itemView.isSelected = true
|
||||||
StoryContextMenu.show(context, itemView, storyPreview, model) { itemView.isSelected = false }
|
model.onLockList()
|
||||||
|
StoryContextMenu.show(context, itemView, storyPreview, model) {
|
||||||
|
itemView.isSelected = false
|
||||||
|
model.onUnlockList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun clearGlide() {
|
private fun clearGlide() {
|
||||||
|
|
Ładowanie…
Reference in New Issue