From 5066767efba77513eaaf24d1f45800b546191263 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Tue, 4 Oct 2016 02:47:35 +0200 Subject: [PATCH] fixes recent commit --- BookAStar/BookAStar/Helpers/RemoteEntity.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/BookAStar/BookAStar/Helpers/RemoteEntity.cs b/BookAStar/BookAStar/Helpers/RemoteEntity.cs index 0245dcc9..06b20b38 100644 --- a/BookAStar/BookAStar/Helpers/RemoteEntity.cs +++ b/BookAStar/BookAStar/Helpers/RemoteEntity.cs @@ -6,7 +6,7 @@ using Newtonsoft.Json; using System.Threading.Tasks; using System.Net; -namespace BookAStar +namespace BookAStar.Helpers { public class RemoteEntity : LocalEntity, ICommand where K : IEquatable @@ -34,8 +34,7 @@ namespace BookAStar if (IsExecuting) throw new InvalidOperationException("Already executing"); IsExecuting = true; - if (CanExecuteChanged != null) - CanExecuteChanged.Invoke(this, new EventArgs()); + CanExecuteChanged.Invoke(this, new EventArgs()); } /// @@ -45,7 +44,7 @@ namespace BookAStar public async void Execute(object parameter) { BeforeExecute(); - using (HttpClient client = CreateClient()) + using (HttpClient client = UserHelpers.CreateClient()) { // Get the whole data try @@ -61,6 +60,7 @@ namespace BookAStar { Merge(item); } + this.SaveCollection(); } } } @@ -75,8 +75,7 @@ namespace BookAStar private void AfterExecuting() { IsExecuting = false; - if (CanExecuteChanged != null) - CanExecuteChanged.Invoke(this, new EventArgs()); + CanExecuteChanged.Invoke(this, new EventArgs()); } public async Task Get(K key)