Bug 29715 - Pull to refresh spinner disappears before completion of asynchronous task
Summary: Pull to refresh spinner disappears before completion of asynchronous task
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 1.4.3
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-04 14:59 UTC by Tomas Winston
Modified: 2016-04-13 18:14 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample exhibiting possible erroneous behaviour in Pull to Refresh - spinner disappearing (72 bytes, text/plain)
2015-05-04 15:05 UTC, Tomas Winston
Details
a (200.44 KB, application/x-zip-compressed)
2015-05-20 18:23 UTC, Chris King
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Tomas Winston 2015-05-04 14:59:12 UTC
Hi,

In my project I am using Azure Mobile Services and retrieving a list of items asynchronously. I am using async/await. I am using the new Pull to Refresh feature of Xamarin.Forms.

After awaiting the loading of the list I am setting an IsBusy property (which I have bound to the IsRefreshing property) to false.

The problem is that if using some form asynchronousity the spinner (animation) disappears before the load (from Azure) completes.

I have managed to reproduce the same behaviour using the Device.StartTimer() procedure. 

Please see code.

Kind regards,

Tomás
Comment 1 Tomas Winston 2015-05-04 15:05:00 UTC
Created attachment 11052 [details]
Sample exhibiting possible erroneous behaviour in Pull to Refresh - spinner disappearing
Comment 2 Chris King 2015-05-20 18:23:28 UTC
Created attachment 11268 [details]
a
Comment 3 Chris King 2015-05-20 18:38:07 UTC
I ran the repro and put a breakpoint at "return false" inside the device timer callback. The spinner remains until that breakpoint is hit. After continuing the spinner vanishes. That is the behavior I expected. Is that not what you expected?

Warm regards,
Xamarin Forms Team
Comment 4 Tomas Winston 2015-05-21 16:29:42 UTC
Hi Chris.

If you just run the app without breakpoints you will see what I am talking about. The spinner starts, disappears before the timeout (5 seconds) is finished, and then (if you are very quick to see it) reappears briefly as the load is completing.

If you look at the LoadExecuteDataCommand procedure you will see a commented out section below the current active one which uses a while loop instead of the timeout. For some reason the same behaviour isn't observed in this scenario.

Can you check once more the sample project without setting the breakpoint? If you cannot reproduce it then I will accept that I am probably doing something silly elsewhere in my project.

Many thanks!

Tomás
Comment 5 Samantha Houts [MSFT] 2016-04-13 18:14:21 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
 
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team