mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Prevent scrolling when context menu is showing on story landing page.
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user