Made the mobile app use mock services by default.

This commit is contained in:
David Britch 2017-03-30 13:50:35 +01:00
parent 10586b984f
commit ff188c8357
2 changed files with 17 additions and 17 deletions
src/Mobile/eShopOnContainers/eShopOnContainers.Core

@ -27,7 +27,7 @@ namespace eShopOnContainers.Core.Helpers
private const string IdUrlBase = "url_base";
private static readonly string AccessTokenDefault = string.Empty;
private static readonly string IdTokenDefault = string.Empty;
private static readonly bool UseMocksDefault = ViewModelLocator.UseMockService;
private static readonly bool UseMocksDefault = true;
private static readonly string UrlBaseDefault = GlobalSetting.Instance.BaseEndpoint;
#endregion

@ -1,5 +1,4 @@
using eShopOnContainers.Core.Helpers;
using eShopOnContainers.Core.ViewModels;
using eShopOnContainers.Core.ViewModels;
using System;
using System.Diagnostics;
using System.Threading.Tasks;
@ -22,14 +21,16 @@ namespace eShopOnContainers.Core.Views
this.Content = null;
this.Content = content;
_animate = true;
await AnimateIn();
var vm = BindingContext as LoginViewModel;
if (vm != null)
{
vm.InvalidateMock();
if (!vm.IsMock)
{
_animate = true;
await AnimateIn();
}
}
}
@ -55,7 +56,6 @@ namespace eShopOnContainers.Core.Views
while (_animate)
{
await uiElement.ScaleTo(1.05, duration, Easing.SinInOut);
await Task.WhenAll(
uiElement.FadeTo(1, duration, Easing.SinInOut),
uiElement.LayoutTo(new Rectangle(new Point(0, 0), new Size(uiElement.Width, uiElement.Height))),