Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: samples/swarm/swarm_ui_lib/view/SliderMenu.dart

Issue 12218131: Combine window.setTimeout/setInterval with Timer and Timer.repeating. Also (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: samples/swarm/swarm_ui_lib/view/SliderMenu.dart
diff --git a/samples/swarm/swarm_ui_lib/view/SliderMenu.dart b/samples/swarm/swarm_ui_lib/view/SliderMenu.dart
index 3eae27ed91bb466f1f9ea2a555ad3c91665cf106..e3b955f77715007af1ecdc99bac213c17e79001f 100644
--- a/samples/swarm/swarm_ui_lib/view/SliderMenu.dart
+++ b/samples/swarm/swarm_ui_lib/view/SliderMenu.dart
@@ -157,7 +157,7 @@ class SliderMenu extends View {
void updateIndicator(bool animate) {
if (selectedItem != null) {
// calculate where we want to put the triangle
- window.setImmediate(() {
+ window.immediate.then((_) {
num x = selectedItem.offsetLeft +
selectedItem.offsetWidth / 2 - TRIANGLE_WIDTH / 2;
_moveIndicator(x, animate);

Powered by Google App Engine
This is Rietveld 408576698