Skip to content

Commit

Permalink
Apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyDL-Infomaniak committed Aug 22, 2024
1 parent 63db7e3 commit 05ab734
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/com/infomaniak/drive/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ class MainActivity : BaseActivity() {
@SuppressLint("ClickableViewAccessibility")
private fun setupBottomNavigation() = with(binding) {

val profileItem = bottomNavigation.findViewById<View>(R.id.menuFragment)

val gestureDetector = GestureDetector(this@MainActivity, object : GestureDetector.SimpleOnGestureListener() {
override fun onDoubleTap(e: MotionEvent): Boolean {
mainViewModel.switchToNextUser { navController.navigate(R.id.homeFragment) }
Expand All @@ -221,7 +219,9 @@ class MainActivity : BaseActivity() {
}
})

profileItem.setOnTouchListener { _, event -> gestureDetector.onTouchEvent(event) }
bottomNavigation.findViewById<View>(R.id.menuFragment).setOnTouchListener { _, event ->
gestureDetector.onTouchEvent(event)
}

bottomNavigation.apply {
setupWithNavControllerCustom(navController)
Expand Down

0 comments on commit 05ab734

Please sign in to comment.