diff --git a/app/src/main/java/org/nuclearfog/twidda/ui/activities/MainActivity.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/MainActivity.java index c6de7e9f..64ab318b 100644 --- a/app/src/main/java/org/nuclearfog/twidda/ui/activities/MainActivity.java +++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/MainActivity.java @@ -139,6 +139,7 @@ public class MainActivity extends AppCompatActivity implements ActivityResultCal Serializable data = savedInstanceState.getSerializable(KEY_USER_SAVE); if (data instanceof User) { currentUser = (User) data; + setCurrentUser(currentUser); } } diff --git a/app/src/main/java/org/nuclearfog/twidda/ui/activities/ProfileActivity.java b/app/src/main/java/org/nuclearfog/twidda/ui/activities/ProfileActivity.java index 8f67dd54..54f50b1c 100644 --- a/app/src/main/java/org/nuclearfog/twidda/ui/activities/ProfileActivity.java +++ b/app/src/main/java/org/nuclearfog/twidda/ui/activities/ProfileActivity.java @@ -120,7 +120,7 @@ public class ProfileActivity extends AppCompatActivity implements OnScrollChange /** * scrollview position threshold to lock/unlock child scrolling */ - private static final int SCROLL_THRESHOLD = 10; + private static final int SCROLL_THRESHOLD = 50; /** * color of the profile image placeholder diff --git a/app/src/main/java/org/nuclearfog/twidda/ui/views/LockableConstraintLayout.java b/app/src/main/java/org/nuclearfog/twidda/ui/views/LockableConstraintLayout.java index f7b18065..da54871a 100644 --- a/app/src/main/java/org/nuclearfog/twidda/ui/views/LockableConstraintLayout.java +++ b/app/src/main/java/org/nuclearfog/twidda/ui/views/LockableConstraintLayout.java @@ -43,7 +43,7 @@ public class LockableConstraintLayout extends ConstraintLayout { float deltaX = ev.getX() - xPos; float deltaY = ev.getY() - yPos; // lock x-axis when swiping up/down - if (!xLock && Math.abs(deltaY) > Math.abs(deltaX) * 3.0f) { + if (!xLock && Math.abs(deltaY) > Math.abs(deltaX) * 2.0f) { xLock = true; } // detect scroll down, then aquire scroll lock @@ -61,7 +61,6 @@ public class LockableConstraintLayout extends ConstraintLayout { case MotionEvent.ACTION_UP: // remove locks on gesture end xLock = false; - yLock = false; break; } return yLock;