diff options
author | adrianknight89 <adrianknight89@outlook.com> | 2016-11-16 02:24:21 -0600 |
---|---|---|
committer | Stephane Delcroix <stephane@delcroix.org> | 2016-11-16 09:24:21 +0100 |
commit | 107ed5e545698a647b9cd1be22745a2c35aeebc4 (patch) | |
tree | 2d7a1a7ffbaead750e706334af77a2b63d29d984 /Xamarin.Forms.Core/BindableObject.cs | |
parent | 46104e9ce186bb06567755f979414e0cbc426db6 (diff) | |
download | xamarin-forms-107ed5e545698a647b9cd1be22745a2c35aeebc4.tar.gz xamarin-forms-107ed5e545698a647b9cd1be22745a2c35aeebc4.tar.bz2 xamarin-forms-107ed5e545698a647b9cd1be22745a2c35aeebc4.zip |
BindingContext changes are called multiple times on app start (#470)
* inherited binding context fix
* add check for child binding context
* Revert "add check for child binding context"
This reverts commit 71952f39129cfedc2358a32100deb07bd32a3080.
* unit tests
Diffstat (limited to 'Xamarin.Forms.Core/BindableObject.cs')
-rw-r--r-- | Xamarin.Forms.Core/BindableObject.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Xamarin.Forms.Core/BindableObject.cs b/Xamarin.Forms.Core/BindableObject.cs index fdf2afad..217f4a94 100644 --- a/Xamarin.Forms.Core/BindableObject.cs +++ b/Xamarin.Forms.Core/BindableObject.cs @@ -98,6 +98,10 @@ namespace Xamarin.Forms return; object oldContext = bindable._inheritedContext; + + if (ReferenceEquals(oldContext, value)) + return; + if (bpContext != null && oldContext == null) oldContext = bpContext.Value; @@ -108,9 +112,6 @@ namespace Xamarin.Forms } else { - if (ReferenceEquals(oldContext, value)) - return; - bindable._inheritedContext = value; } |