Prevent e2e details modale to show up while scrolling

This commit is contained in:
Sylvain Berfini 2024-02-13 12:21:51 +01:00
parent d429f181a0
commit 8a01f30a8d

View file

@ -241,6 +241,7 @@ class ConversationFragment : SlidingPaneChildFragment() {
): Boolean { ): Boolean {
// Following code is only to detect click on header at position 0 // Following code is only to detect click on header at position 0
if (::headerItemDecoration.isInitialized) { if (::headerItemDecoration.isInitialized) {
if (e.action == MotionEvent.ACTION_UP) {
if ((rv.layoutManager as LinearLayoutManager).findFirstCompletelyVisibleItemPosition() == 0) { if ((rv.layoutManager as LinearLayoutManager).findFirstCompletelyVisibleItemPosition() == 0) {
if (e.y >= 0 && e.y <= headerItemDecoration.getDecorationHeight(0)) { if (e.y >= 0 && e.y <= headerItemDecoration.getDecorationHeight(0)) {
showEndToEndEncryptionDetailsBottomSheet() showEndToEndEncryptionDetailsBottomSheet()
@ -248,6 +249,7 @@ class ConversationFragment : SlidingPaneChildFragment() {
} }
} }
} }
}
return false return false
} }