kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove RTL swap of tapping edges in story viewer.
rodzic
957f8754e1
commit
9bb834e9f5
|
@ -1073,24 +1073,8 @@ class StoryViewerPageFragment :
|
||||||
|
|
||||||
fun onActionUp(e: MotionEvent) {
|
fun onActionUp(e: MotionEvent) {
|
||||||
if (e.x < container.measuredWidth * getLeftBoundary()) {
|
if (e.x < container.measuredWidth * getLeftBoundary()) {
|
||||||
performLeftAction()
|
onGoToPrevious()
|
||||||
} else if (e.x > container.measuredWidth - (container.measuredWidth * getRightBoundary())) {
|
} else if (e.x > container.measuredWidth - (container.measuredWidth * getRightBoundary())) {
|
||||||
performRightAction()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun performLeftAction() {
|
|
||||||
if (container.layoutDirection == View.LAYOUT_DIRECTION_RTL) {
|
|
||||||
onGoToNext()
|
|
||||||
} else {
|
|
||||||
onGoToPrevious()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun performRightAction() {
|
|
||||||
if (container.layoutDirection == View.LAYOUT_DIRECTION_RTL) {
|
|
||||||
onGoToPrevious()
|
|
||||||
} else {
|
|
||||||
onGoToNext()
|
onGoToNext()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue