Ejemplo n.º 1
0
        public void Update()
        {
            bool changed  = false;
            var  newModel = new TrustedContactsViewModel(settings);

            foreach (var areTheySame in newModel.Contacts.Zip(model.Contacts, (f, s) => f.ShowName.Equals(s.ShowName)))
            {
                changed = changed || !areTheySame;
            }

            if (changed)
            {
                Device.BeginInvokeOnMainThread(() =>
                {
                    base.OnAppearing();
                    BindingContext = newModel;
                });
            }
        }
Ejemplo n.º 2
0
 protected override void OnAppearing()
 {
     base.OnAppearing();
     model          = new TrustedContactsViewModel(settings);
     BindingContext = model;
 }