Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit b82ffdda authored by Rafael Tonholo's avatar Rafael Tonholo Committed by GitHub
Browse files

Merge pull request #9842 from rafaeltonholo/fix/9548/pull-to-refresh-taking-over-swipe-gesture

fix(message-list): prevent the pull-to-refresh gesture from taking over the swipe gesture while swiping
parents eb2b3e4c 3f919ff1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1899,6 +1899,7 @@ class MessageListFragment :

    private val swipeListener = object : MessageListSwipeListener {
        override fun onSwipeStarted(item: MessageListItem, action: SwipeAction) {
            swipeRefreshLayout?.isEnabled = false
            itemSelectedOnSwipeStart = isMessageSelected(item)
            if (itemSelectedOnSwipeStart && action != SwipeAction.ToggleSelection) {
                deselectMessage(item)
@@ -1969,6 +1970,7 @@ class MessageListFragment :
        }

        override fun onSwipeEnded(item: MessageListItem) {
            swipeRefreshLayout?.isEnabled = true
            if (itemSelectedOnSwipeStart && !isMessageSelected(item)) {
                selectMessage(item)
            }