summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2016-08-16 10:56:37 -0700
committerJason Smith <jason.smith@xamarin.com>2016-08-16 10:56:37 -0700
commit33303a09df486f1bb056b0e026a4156546143e49 (patch)
treed75c8b228d09f5a8436cfd4ae21cf1b38e04e3a2 /Xamarin.Forms.Controls.Issues
parenta1126ab66bc9bd41cfa32dbefbe5758bcf5b4b32 (diff)
downloadxamarin-forms-33303a09df486f1bb056b0e026a4156546143e49.tar.gz
xamarin-forms-33303a09df486f1bb056b0e026a4156546143e49.tar.bz2
xamarin-forms-33303a09df486f1bb056b0e026a4156546143e49.zip
[iOS] Fixed bug that made pull-to-refresh indicator always visible after 2+ pulls (#307)
* Add repro for Bugzilla 43214 * [iOS] Undo change to ListViewRenderer was attempting to prevent multiple unnecessary calls to SendRefreshing, but this caused unintended problems.
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43214.cs52
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
2 files changed, 53 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43214.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43214.cs
new file mode 100644
index 00000000..0480bf54
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43214.cs
@@ -0,0 +1,52 @@
+using System.Linq;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 43214, "Setting Listview.IsRefreshing to false does not work on second \"pull\"")]
+ public class Bugzilla43214 : TestContentPage
+ {
+ public class MyViewModel : ViewModel
+ {
+ bool _isBusy;
+
+ public bool IsBusy
+ {
+ get { return _isBusy; }
+ set
+ {
+ _isBusy = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
+ protected override void Init()
+ {
+ var vm = new MyViewModel();
+
+ var label = new Label { Text = "Pull list to refresh once, then pull to refresh again. If the indicator does not disappear, this test has failed." };
+ var listview = new ListView
+ {
+ ItemsSource = Enumerable.Range(0, 20),
+ IsPullToRefreshEnabled = true,
+ RefreshCommand = new Command(async () =>
+ {
+ vm.IsBusy = true;
+ await Task.Delay(1000);
+ vm.IsBusy = false;
+ })
+ };
+
+ listview.SetBinding(ListView.IsRefreshingProperty, nameof(MyViewModel.IsBusy));
+
+ var stacklayout = new StackLayout { Children = { label, listview }, BindingContext = vm };
+
+ Content = stacklayout;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 8d1e0b40..6d35da9f 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -173,6 +173,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla42277.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ImageLoadingErrorHandling.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla33561.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43214.cs" />
<Compile Include="$(MSBuildThisFileDirectory)_Template.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue1028.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue1075.cs" />