Made the mobile app use mock services by default.
This commit is contained in:
parent
10586b984f
commit
ff188c8357
@ -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)
|
||||
var vm = BindingContext as LoginViewModel;
|
||||
if (vm != null)
|
||||
{
|
||||
vm.InvalidateMock();
|
||||
|
||||
if (!vm.IsMock)
|
||||
{
|
||||
_animate = true;
|
||||
await AnimateIn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,14 +55,13 @@ 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))),
|
||||
uiElement.FadeTo(.9, duration, Easing.SinInOut),
|
||||
uiElement.ScaleTo(1.15, duration, Easing.SinInOut)
|
||||
);
|
||||
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))),
|
||||
uiElement.FadeTo(.9, duration, Easing.SinInOut),
|
||||
uiElement.ScaleTo(1.15, duration, Easing.SinInOut)
|
||||
);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Loading…
x
Reference in New Issue
Block a user