From fa5ad6a17afdd5c6d83b85848bc3b883b00020dc Mon Sep 17 00:00:00 2001 From: secrecyflag <96260868+secrecyflag@users.noreply.github.com> Date: Thu, 30 Mar 2023 07:53:15 -0400 Subject: [PATCH] Add swipe haptics --- .../java/app/grapheneos/camera/ui/activities/MainActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt b/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt index 2d23255e4..18b863578 100644 --- a/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt +++ b/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt @@ -1396,6 +1396,8 @@ open class MainActivity : AppCompatActivity(), val i = tabLayout.selectedTabPosition - 1 + vibrateDevice() + Log.i(TAG, "onSwipeRight $i") tabLayout.getTabAt(i)?.let { finalizeMode(it) @@ -1416,6 +1418,8 @@ open class MainActivity : AppCompatActivity(), wasSwiping = true if (settingsDialog.isShowing) return + vibrateDevice() + val i = tabLayout.selectedTabPosition + 1 tabLayout.getTabAt(i)?.let { finalizeMode(it)