Skip to content

Commit

Permalink
CancelMenu was being invoked from a background thread, thanks MonoTou…
Browse files Browse the repository at this point in the history
…ch 5.3.3!
  • Loading branch information
migueldeicaza committed Apr 21, 2012
1 parent c458e02 commit f502dcc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions TweetStation/UI/Timeline.cs
Expand Up @@ -501,15 +501,19 @@ void Load (int page, long since_id)
{
var fullUrl = BuildUrl (page, since_id);
TwitterAccount.CurrentAccount.Download (fullUrl, false, res => {
CancelMenu ();
if (res == null){
BeginInvokeOnMainThread (delegate { Root = Util.MakeError (TimelineTitle); });
BeginInvokeOnMainThread (delegate {
CancelMenu ();
Root = Util.MakeError (TimelineTitle);
});
return;
}
Element [] tweetArray = (from tweet in GetTweetStream (res) select (Element) new TweetElement (tweet)).ToArray ();
// Now on the main thread, do the UI work
BeginInvokeOnMainThread (delegate {
CancelMenu ();
Section section;
if (since_id == 0){
if (page == 1){
Expand Down

0 comments on commit f502dcc

Please sign in to comment.