Commit bc51c319 by Luis

Arregladas Incidencias

parent 54753559
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<AssemblyName>inutralia.Abstract</AssemblyName> <AssemblyName>inutralia.Abstract</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile> <TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
<ReleaseVersion>1.5</ReleaseVersion> <ReleaseVersion>1.6</ReleaseVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion> <TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<AssemblyName>inutralia.Droid</AssemblyName> <AssemblyName>inutralia.Droid</AssemblyName>
<ReleaseVersion>1.5</ReleaseVersion> <ReleaseVersion>1.6</ReleaseVersion>
<AndroidTlsProvider> <AndroidTlsProvider>
</AndroidTlsProvider> </AndroidTlsProvider>
</PropertyGroup> </PropertyGroup>
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause> <ConsolePause>false</ConsolePause>
<AndroidLinkMode>None</AndroidLinkMode> <AndroidLinkMode>None</AndroidLinkMode>
<AotAssemblies>false</AotAssemblies>
<EnableLLVM>false</EnableLLVM>
<BundleAssemblies>false</BundleAssemblies>
<AndroidSupportedAbis /> <AndroidSupportedAbis />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
......
namespace inutralia.Models namespace inutralia.Models
{ {
using Newtonsoft.Json; using Newtonsoft.Json;
using System;
using System.ComponentModel; using System.ComponentModel;
/// <summary> /// <summary>
...@@ -10,6 +11,9 @@ ...@@ -10,6 +11,9 @@
[DataPath("LocalMenu")] [DataPath("LocalMenu")]
public class LocalMenu : Menu public class LocalMenu : Menu
{ {
private static JsonSerializerSettings _jsonSettings = new JsonSerializerSettings private static JsonSerializerSettings _jsonSettings = new JsonSerializerSettings
{ {
ObjectCreationHandling = ObjectCreationHandling.Replace, ObjectCreationHandling = ObjectCreationHandling.Replace,
...@@ -50,6 +54,7 @@ ...@@ -50,6 +54,7 @@
[JsonProperty("last_id")] [JsonProperty("last_id")]
public int LastReceivedMenuId; public int LastReceivedMenuId;
/// <summary> /// <summary>
/// Copia los datos del menú recibido del servidor /// Copia los datos del menú recibido del servidor
/// </summary> /// </summary>
...@@ -66,6 +71,7 @@ ...@@ -66,6 +71,7 @@
// Asignar último menú recibido // Asignar último menú recibido
LastReceivedMenuId = menu.Id; LastReceivedMenuId = menu.Id;
} }
} }
} }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<AssemblyName>inutralia.Models</AssemblyName> <AssemblyName>inutralia.Models</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile> <TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
<ReleaseVersion>1.5</ReleaseVersion> <ReleaseVersion>1.6</ReleaseVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<AssemblyName>inutralia.Utils</AssemblyName> <AssemblyName>inutralia.Utils</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile> <TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
<ReleaseVersion>1.6</ReleaseVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
<AssemblyName>inutralia.iOS</AssemblyName> <AssemblyName>inutralia.iOS</AssemblyName>
<ReleaseVersion>1.5</ReleaseVersion> <ReleaseVersion>1.6</ReleaseVersion>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
<InstallFrom>Disk</InstallFrom> <InstallFrom>Disk</InstallFrom>
......
...@@ -147,6 +147,6 @@ Global ...@@ -147,6 +147,6 @@ Global
SolutionGuid = {2A2F23F0-D76F-45EC-851B-854DF4BF96C6} SolutionGuid = {2A2F23F0-D76F-45EC-851B-854DF4BF96C6}
EndGlobalSection EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution GlobalSection(MonoDevelopProperties) = preSolution
version = 1.5 version = 1.6
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{ {
class Constants class Constants
{ {
public static readonly string ApiUrlTemplate = "http://i20.inutralia.com/api/v1/{0}?api-key=7745289b-f09c-4e0b-89d1-bb59c599c85e"; public static readonly string ApiUrlTemplate = "https://i20.inutralia.com/api/v1/{0}?api-key=7745289b-f09c-4e0b-89d1-bb59c599c85e";
// Url redirect a DEL SUPER // Url redirect a DEL SUPER
public const string ApiUrl = "https://delsuper.es/inutralia?ids="; public const string ApiUrl = "https://delsuper.es/inutralia?ids=";
......
...@@ -13,6 +13,7 @@ namespace inutralia ...@@ -13,6 +13,7 @@ namespace inutralia
public partial class App : Application public partial class App : Application
{ {
private static bool _IsUserLoggedIn = false; private static bool _IsUserLoggedIn = false;
public static bool IsUserLoggedIn public static bool IsUserLoggedIn
{ {
get { return _IsUserLoggedIn; } get { return _IsUserLoggedIn; }
...@@ -28,7 +29,20 @@ namespace inutralia ...@@ -28,7 +29,20 @@ namespace inutralia
} }
} }
public static WebService API { get; private set; }
public static bool _IsMenuConsultado = false;
public static bool IsMenuConsultado
{
get { return _IsMenuConsultado; }
set
{
_IsMenuConsultado = value;
}
}
public static WebService API { get; private set; }
public static LocalDataService LocalData { get; private set; } public static LocalDataService LocalData { get; private set; }
protected static List<RecipeOptionGroup> _FilterOptions = null; protected static List<RecipeOptionGroup> _FilterOptions = null;
......
// Helpers/Settings.cs
using Plugin.Settings;
using Plugin.Settings.Abstractions;
namespace inutralia.Helpers namespace inutralia.Helpers
{ {
using Plugin.Settings; /// <summary>
using Plugin.Settings.Abstractions; /// This is the Settings static class that can be used in your Core solution or in any
/// of your client applications. All settings are laid out the same exact way with getters
/// <summary> /// and setters.
/// This is the Settings static class that can be used in your Core solution or in any /// </summary>
/// of your client applications. All settings are laid out the same exact way with getters public static class Settings
/// and setters. {
/// </summary> private static ISettings AppSettings
public static class Settings
{ {
private static ISettings AppSettings get
{ {
get return CrossSettings.Current;
{ }
return CrossSettings.Current; }
}
} #region Setting Constants
private const string SettingsKey = "settings_key"; private const string SettingsKey = "settings_key";
private static readonly string SettingsDefault = string.Empty; private static readonly string SettingsDefault = string.Empty;
public static string GeneralSettings #endregion
{
get
{ public static string GeneralSettings
return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault); {
} get
set {
{ return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault);
AppSettings.AddOrUpdateValue<string>(SettingsKey, value); }
} set
} {
AppSettings.AddOrUpdateValue<string>(SettingsKey, value);
}
} }
}
} }
\ No newline at end of file
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
using Xamarin.Forms; using Xamarin.Forms;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System;
public class CustomMenuViewModel : MenuBaseViewModel public class CustomMenuViewModel : MenuBaseViewModel
{ {
public CustomMenuViewModel() : this(new Models.Menu()) { } public CustomMenuViewModel() : this(new Models.Menu()) { }
public CustomMenuViewModel(Models.Menu menu) : base(menu) { } public CustomMenuViewModel(Models.Menu menu) : base(menu) { }
...@@ -219,7 +221,7 @@ ...@@ -219,7 +221,7 @@
IsBusy = true; IsBusy = true;
OnPropertyChanged("NoMenuPanel"); OnPropertyChanged("NoMenuPanel");
// Obtener menú local // Obtener menú local
var lista = await App.LocalData.RefreshListAsync<LocalMenu>(); var lista = await App.LocalData.RefreshListAsync<LocalMenu>();
if (lista.Count > 0) if (lista.Count > 0)
...@@ -230,8 +232,11 @@ ...@@ -230,8 +232,11 @@
} //endif } //endif
// Obtener menú del servidor // Obtener menú del servidor
if (await App.API.RefreshItemAsync(Model)) if (App.IsMenuConsultado == false && await App.API.RefreshItemAsync(Model))
{ {
App.IsMenuConsultado = true;
Models.Menu ServerMenu = Model as Models.Menu; Models.Menu ServerMenu = Model as Models.Menu;
if (_LocalMenu == null) if (_LocalMenu == null)
...@@ -333,7 +338,8 @@ ...@@ -333,7 +338,8 @@
// Eliminar de la lista de la compra los ingredientes que no estén en los encontrados // Eliminar de la lista de la compra los ingredientes que no estén en los encontrados
var listaCompra = await App.LocalData.RefreshListAsync<ShoppingList>(); var listaCompra = await App.LocalData.RefreshListAsync<ShoppingList>();
//foreach (var ing in listaCompra.Where(sl => sl.FromMenus && !ingredients.Contains(sl.Text))) //foreach (var ing in listaCompra.Where(sl => sl.FromMenus && !ingredients.Contains(sl.Text)))
foreach (var ing in listaCompra.Where(sl => sl.FromMenus && !ingredients.Any(o => o.Name.Contains(sl.Text)))) //foreach (var ing in listaCompra.Where(sl => sl.FromMenus && !ingredients.Any(o => o.Name.Contains(sl.Text))))
foreach (var ing in listaCompra)
{ {
await App.LocalData.DeleteItemAsync(ing); await App.LocalData.DeleteItemAsync(ing);
} //endforeach } //endforeach
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<AssemblyName>inutralia</AssemblyName> <AssemblyName>inutralia</AssemblyName>
<ReleaseVersion>1.5</ReleaseVersion> <ReleaseVersion>1.6</ReleaseVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
...@@ -442,6 +442,21 @@ ...@@ -442,6 +442,21 @@
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Forms.3.0.0.561731\lib\netstandard1.0\Xamarin.Forms.Xaml.dll</HintPath> <HintPath>..\packages\Xamarin.Forms.3.0.0.561731\lib\netstandard1.0\Xamarin.Forms.Xaml.dll</HintPath>
</Reference> </Reference>
<Reference Include="Xamarin.Forms.Core">
<HintPath>..\packages\Xamarin.Forms.3.0.0.561731\lib\netstandard1.0\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform">
<HintPath>..\packages\Xamarin.Forms.3.0.0.561731\lib\netstandard1.0\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\packages\Xamarin.Forms.3.0.0.561731\lib\netstandard1.0\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="Plugin.Settings.Abstractions">
<HintPath>..\packages\Xam.Plugins.Settings.2.5.8\lib\portable-net45+wp80+win8+wpa81\Plugin.Settings.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Plugin.Settings">
<HintPath>..\packages\Xam.Plugins.Settings.2.5.8\lib\portable-net45+wp80+win8+wpa81\Plugin.Settings.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Views\ShoppingList\ListDelSuper.xaml"> <EmbeddedResource Include="Views\ShoppingList\ListDelSuper.xaml">
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
<package id="UXDivers.Artina.Shared" version="2.0.35" targetFramework="portable45-net45+win8+wp8" /> <package id="UXDivers.Artina.Shared" version="2.0.35" targetFramework="portable45-net45+win8+wp8" />
<package id="UXDivers.Artina.Shared.Base" version="2.0.35" targetFramework="portable45-net45+win8+wp8" /> <package id="UXDivers.Artina.Shared.Base" version="2.0.35" targetFramework="portable45-net45+win8+wp8" />
<package id="UXDivers.Effects" version="0.6.3" targetFramework="portable45-net45+win8+wp8" /> <package id="UXDivers.Effects" version="0.6.3" targetFramework="portable45-net45+win8+wp8" />
<package id="Xam.Plugins.Settings" version="3.1.1" targetFramework="portable45-net45+win8+wp8" /> <package id="Xam.Plugins.Settings" version="2.5.8" targetFramework="portable45-net45+win8+wp8" />
<package id="Xamarin.FFImageLoading" version="2.4.3.840" targetFramework="portable45-net45+win8+wp8" /> <package id="Xamarin.FFImageLoading" version="2.4.3.840" targetFramework="portable45-net45+win8+wp8" />
<package id="Xamarin.FFImageLoading.Forms" version="2.4.3.840" targetFramework="portable45-net45+win8+wp8" /> <package id="Xamarin.FFImageLoading.Forms" version="2.4.3.840" targetFramework="portable45-net45+win8+wp8" />
<package id="Xamarin.Forms" version="3.4.0.1008975" targetFramework="portable45-net45+win8+wp8" /> <package id="Xamarin.Forms" version="3.0.0.561731" targetFramework="portable45-net45+win8+wp8" />
</packages> </packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment