Closed mohibsheth closed 11 years ago
I think you need to await the GetNetworkStatus call in GetList and make GetNetworkStatus async...
if (await GetNetworkStatus())
Thanks for your prompt response.
I am sorry for not specifying that in my message earlier. I am doing GetNetworkStatus().Result. Does that not await automatically? I will still try as you mentioned tomorrow at work and get back to you.
Doing .Result should await, however the alert dialog is being run on the UI thread which might be causing confusion.
So await should resolve this issue right? I will certainly try this tomorrow and let you know the outcome.
Hey Brian, Thanks. Using await has resolved the issue. :)
Hi,
This may not actually be an issue, but I didnt know how else to contact you so creating this issue so maybe you could help.
I have an MvvmCross app where I load data from a web service. so the command method somewhat looks like this...
The GetList implementation is...
The GetNetworkStatus function is where I am trying to check for network availability and prompt user to retry or go offline.
The Alert is never shown when I use this line in GetNetworkStatus. If I use this same line in my ViewModel command or even in GetList of my service... it works but does not work in GetNetworkStatus.
Would you happen to know why?