This commit is contained in:
Niels Andriesse 2021-06-10 14:24:18 +10:00
parent c69d66e6a4
commit c79b9e3397
2 changed files with 0 additions and 3 deletions

View File

@ -99,7 +99,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity() {
override fun onPrepareOptionsMenu(menu: Menu): Boolean {
ConversationMenuHelper.onPrepareOptionsMenu(menu, menuInflater, thread, this) { onOptionsItemSelected(it) }
// FIXME: Make the menu respect the current app theme
super.onPrepareOptionsMenu(menu)
return true
}

View File

@ -21,12 +21,10 @@ class ConversationRecyclerView : RecyclerView {
}
override fun onInterceptTouchEvent(e: MotionEvent): Boolean {
Log.d("Test", "here")
val velocityTracker = velocityTracker ?: return super.onInterceptTouchEvent(e)
velocityTracker.computeCurrentVelocity(1000) // Specifying 1000 gives pixels per second
val vx = velocityTracker.xVelocity
val vy = velocityTracker.yVelocity
Log.d("Test", "vx: $vx, vy: $vy")
// Only allow swipes to the left; allowing swipes to the right interferes with some back gestures
if (vx > 0) { return super.onInterceptTouchEvent(e) }
// Return false if abs(v.x) > abs(v.y) so that only swipes that are more horizontal than vertical