Fixed bug 43993 by removing call to base ViewWillAppear (#333)
authoradrianknight89 <adrianknight89@outlook.com>
Tue, 4 Oct 2016 16:31:15 +0000 (11:31 -0500)
committerRui Marinho <me@ruimarinho.net>
Tue, 4 Oct 2016 16:31:15 +0000 (17:31 +0100)
* Fixed bug 43993 by removing call to base ViewWillAppear

* Removed commented code and reduced nesting

Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs

index 07025c7..3913632 100644 (file)
@@ -1076,14 +1076,11 @@ namespace Xamarin.Forms.Platform.iOS
 
                public override void ViewWillAppear(bool animated)
                {
-                       base.ViewWillAppear(animated);
+                   if (!_list.IsRefreshing || !_refresh.Refreshing) return;
 
-                       if (_list.IsRefreshing && _refresh.Refreshing)
-                       {
-                               // Restart the refreshing to get the animation to trigger
-                               UpdateIsRefreshing(false);
-                               UpdateIsRefreshing(true);
-                       }
+                   // Restart the refreshing to get the animation to trigger
+                   UpdateIsRefreshing(false);
+                   UpdateIsRefreshing(true);
                }
 
                protected override void Dispose(bool disposing)