Reviewers: cromwellian,

Description:
Leave "dead" views in place to reduce flicker, at least until
caching is here.

Review by: cromwell...@google.com

Please review this at http://gwt-code-reviews.appspot.com/493802/show

Affected files:
  M /bikeshed/src/com/google/gwt/app/place/ActivityManager.java
  M /bikeshed/test/com/google/gwt/app/place/ActivityManagerTest.java


Index: /bikeshed/src/com/google/gwt/app/place/ActivityManager.java
===================================================================
--- /bikeshed/src/com/google/gwt/app/place/ActivityManager.java (revision 8109) +++ /bikeshed/src/com/google/gwt/app/place/ActivityManager.java (working copy)
@@ -88,7 +88,11 @@
       currentActivity = null;
       startingNext = false;
     } else if (currentActivity != null) {
-      display.showActivityWidget(null);
+      /*
+ * TODO until caching is in place, relying on stopped activities to be
+       * good citizens to reduce flicker. This makes me very nervous.
+       */
+//      display.showActivityWidget(null);
       currentActivity.onStop();
     }

@@ -119,9 +123,8 @@

       /*
* TODO Allow asynchronous willClose check? Could have the event object
-       * vend callbacks. Place change doesn't happen until they all vended
-       * callbacks, if any, reply with yes. Would likely need to add
-       * onPlaceChangeCanceled?
+ * vend callbacks. Place change doesn't happen until all vended callbacks, + * if any, reply with yes. Would likely need to add onPlaceChangeCanceled?
        *
* Complicated, but I really want to keep AM and PC isolated. Alternative * is to mash them together and take place conversation off the event bus.
Index: /bikeshed/test/com/google/gwt/app/place/ActivityManagerTest.java
===================================================================
--- /bikeshed/test/com/google/gwt/app/place/ActivityManagerTest.java (revision 8109) +++ /bikeshed/test/com/google/gwt/app/place/ActivityManagerTest.java (working copy)
@@ -162,7 +162,11 @@
     assertNull(asyncActivity2.display);

     eventBus.fireEvent(new PlaceChangeEvent<Place>(place2));
-    assertNull(realDisplay.widget);
+    /*
+     * TODO until caching is in place, relying on stopped activities to be
+     * good citizens to reduce flicker. This makes me very nervous.
+     */
+//    assertNull(realDisplay.widget);
     assertFalse(asyncActivity1.canceled);
     assertTrue(asyncActivity1.stopped);
     assertFalse(asyncActivity2.stopped);


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to