Async operation in Windows 8

Aug 27, 2012 at 4:42 PM

In newly updated metroOAuthDemo, I updated below code in TweetPage.xaml.cs

var twitterCtx = new TwitterContext (auth);

 

Status tweet = twitterCtx.UpdateStatus(TweetTextBox.Text, async updateResp => await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>

{

 

if(updateResp.Error == null) 

await new MessageDialog(updateResp.State.Text, "Successful Tweet"

).ShowAsync();

}

));

But still it freezes UI till operation finished. Please Suggest what to be done for Async call.

Thanks

Coordinator
Aug 29, 2012 at 3:15 PM

Hi,

Thanks for identifying this.  I'll take a look.

Joe

Coordinator
Sep 5, 2012 at 3:25 AM

I found where it was explicitly blocking. This was good - gave me a chance to clean up the code and fix that issue. I've checked in the fix, so you're welcome to look at it and let me know if you see anything strange.

Joe

Sep 10, 2012 at 8:04 AM

Thanks Joe,

Sorry for late reply. Will check once my win 8 issue resolved.