Skip to content

Commit

Permalink
Shuffle Reload in a way that it won't get called outside the main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
spouliot committed Dec 10, 2013
1 parent 7de7e7c commit 255bf7d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions NUnitLite/TouchRunner/TestCaseElement.cs
Expand Up @@ -58,6 +58,9 @@ public TestCaseElement (TestMethod testCase, TouchRunner runner)
};
var dvc = new DialogViewController (root, true) { Autorotate = true };
runner.NavigationController.PushViewController (dvc, true);
} else if (GetContainerTableView () != null) {
var root = GetImmediateRootElement ();
root.Reload (this, UITableViewRowAnimation.Fade);
}
};
}
Expand Down
5 changes: 0 additions & 5 deletions NUnitLite/TouchRunner/TestElement.cs
Expand Up @@ -59,11 +59,6 @@ public void Update (TestResult result)
Result = result;

Update ();

if (GetContainerTableView () != null) {
var root = GetImmediateRootElement ();
root.Reload (this, UITableViewRowAnimation.Fade);
}
}

abstract public void Update ();
Expand Down
5 changes: 5 additions & 0 deletions NUnitLite/TouchRunner/TestSuiteElement.cs
Expand Up @@ -81,6 +81,11 @@ public override void Update ()
sb.Append (", ").Append (skipped).Append (" ignored");
}
Value = sb.ToString ();

if (GetContainerTableView () != null) {
var root = GetImmediateRootElement ();
root.Reload (this, UITableViewRowAnimation.Fade);
}
}
}
}

0 comments on commit 255bf7d

Please sign in to comment.