Disable debug messages

multisite
Floens 10 years ago
parent beaf727f61
commit 2845e81df2
  1. 2
      Clover/app/src/main/java/org/floens/chan/controller/Controller.java
  2. 12
      Clover/app/src/main/java/org/floens/chan/controller/ui/NavigationControllerContainerLayout.java

@ -36,7 +36,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public abstract class Controller { public abstract class Controller {
private static final boolean LOG_STATES = true; private static final boolean LOG_STATES = false;
public Context context; public Context context;
public ViewGroup view; public ViewGroup view;

@ -216,14 +216,14 @@ public class NavigationControllerContainerLayout extends FrameLayout {
if (translationX > 0) { if (translationX > 0) {
boolean doFlingAway = false; boolean doFlingAway = false;
Logger.test("velocity = %d", velocity); // Logger.test("velocity = %d", velocity);
if ((velocity > 0 && Math.abs(velocity) > 2500 && Math.abs(velocity) < maxFlingPixels) || translationX >= getWidth() * 3 / 4) { if ((velocity > 0 && Math.abs(velocity) > 2500 && Math.abs(velocity) < maxFlingPixels) || translationX >= getWidth() * 3 / 4) {
// int left = getWidth() - translationX; // int left = getWidth() - translationX;
// int flingVelocity = Math.max(velocity, 0); // int flingVelocity = Math.max(velocity, 0);
scroller.fling(translationX, 0, velocity, 0, 0, Integer.MAX_VALUE, 0, 0); scroller.fling(translationX, 0, velocity, 0, 0, Integer.MAX_VALUE, 0, 0);
Logger.test("finalX = %d getWidth = %d", scroller.getFinalX(), getWidth()); // Logger.test("finalX = %d getWidth = %d", scroller.getFinalX(), getWidth());
// Make sure the animation always goes past the end // Make sure the animation always goes past the end
if (scroller.getFinalX() < getWidth()) { if (scroller.getFinalX() < getWidth()) {
@ -231,13 +231,13 @@ public class NavigationControllerContainerLayout extends FrameLayout {
} }
doFlingAway = true; doFlingAway = true;
Logger.test("Flinging away with velocity = %d", velocity); // Logger.test("Flinging away with velocity = %d", velocity);
} }
if (doFlingAway) { if (doFlingAway) {
startFlingAnimation(true); startFlingAnimation(true);
} else { } else {
Logger.test("Snapping back"); // Logger.test("Snapping back");
scroller.forceFinished(true); scroller.forceFinished(true);
scroller.startScroll(translationX, 0, -translationX, 0, 250); scroller.startScroll(translationX, 0, -translationX, 0, 250);
startFlingAnimation(false); startFlingAnimation(false);
@ -291,11 +291,11 @@ public class NavigationControllerContainerLayout extends FrameLayout {
Time.endTiming("attach", start); Time.endTiming("attach", start);
Logger.test("Start tracking " + trackingController.getClass().getSimpleName()); // Logger.test("Start tracking " + trackingController.getClass().getSimpleName());
} }
private void endTracking(boolean finishTransition) { private void endTracking(boolean finishTransition) {
Logger.test("endTracking finishTransition = " + finishTransition); // Logger.test("endTracking finishTransition = " + finishTransition);
if (!tracking) { if (!tracking) {
throw new IllegalStateException("endTracking called but was not tracking"); throw new IllegalStateException("endTracking called but was not tracking");

Loading…
Cancel
Save