fixes recent commit

vnext
Paul Schneider 8 years ago
parent 464e87284e
commit 5066767efb
1 changed files with 5 additions and 6 deletions

@ -6,7 +6,7 @@ using Newtonsoft.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Net; using System.Net;
namespace BookAStar namespace BookAStar.Helpers
{ {
public class RemoteEntity<V,K> : LocalEntity<V, K>, ICommand where K : IEquatable<K> public class RemoteEntity<V,K> : LocalEntity<V, K>, ICommand where K : IEquatable<K>
@ -34,7 +34,6 @@ namespace BookAStar
if (IsExecuting) if (IsExecuting)
throw new InvalidOperationException("Already executing"); throw new InvalidOperationException("Already executing");
IsExecuting = true; 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) public async void Execute(object parameter)
{ {
BeforeExecute(); BeforeExecute();
using (HttpClient client = CreateClient()) using (HttpClient client = UserHelpers.CreateClient())
{ {
// Get the whole data // Get the whole data
try try
@ -61,6 +60,7 @@ namespace BookAStar
{ {
Merge(item); Merge(item);
} }
this.SaveCollection();
} }
} }
} }
@ -75,7 +75,6 @@ namespace BookAStar
private void AfterExecuting() private void AfterExecuting()
{ {
IsExecuting = false; IsExecuting = false;
if (CanExecuteChanged != null)
CanExecuteChanged.Invoke(this, new EventArgs()); CanExecuteChanged.Invoke(this, new EventArgs());
} }

Loading…