summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkingces95 <kingces95@users.noreply.github.com>2017-04-06 17:47:12 -0400
committerRui Marinho <me@ruimarinho.net>2017-04-06 22:47:12 +0100
commit45a6a80b4c2d9be199f7c61a89bbaa3e5f829564 (patch)
treebff9d88616e509212792a58ccee2931f083f2acc
parent1a7aea41ffa43a652e053a5b2e34b76a371a598d (diff)
downloadxamarin-forms-45a6a80b4c2d9be199f7c61a89bbaa3e5f829564.tar.gz
xamarin-forms-45a6a80b4c2d9be199f7c61a89bbaa3e5f829564.tar.bz2
xamarin-forms-45a6a80b4c2d9be199f7c61a89bbaa3e5f829564.zip
Fix 52962; Cont refresh even when pullToRefresh is disabled (#810)
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs
index 8581e26e..9eaeb789 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs
@@ -1168,14 +1168,15 @@ namespace Xamarin.Forms.Platform.iOS
RefreshControl = _refresh;
}
}
- else if (_refreshAdded)
- {
- if (_refresh.Refreshing)
- _refresh.EndRefreshing();
-
- RefreshControl = null;
- _refreshAdded = false;
- }
+ // https://bugzilla.xamarin.com/show_bug.cgi?id=52962
+ // just because pullToRefresh is being disabled does not mean we should kill an in progress refresh.
+ // Consider the case where:
+ // 1. User pulls to refresh
+ // 2. App RefreshCommand fires (at this point _refresh.Refreshing is true)
+ // 3. RefreshCommand disables itself via a call to ChangeCanExecute which returns false
+ // (maybe the command it's attached to a button the app wants disabled)
+ // 4. OnCommandCanExecuteChanged handler sets RefreshAllowed to false because the RefreshCommand is disabled
+ // 5. We end up here; A refresh is in progress while being asked to disable pullToRefresh
}
public void UpdateShowHideRefresh(bool shouldHide)