Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix so the system request with operate on the UI Thread

  • Loading branch information...
commit 9536e6151f870b9817ceb4fb6d05e032e9cdc45a 1 parent f964f18
DanielDar DanielDar authored
13 Raven.Studio/Infrastructure/Model.cs
View
@@ -39,12 +39,15 @@ internal void TimerTicked()
{
if (task.IsFaulted == false)
{
- if (task.Result != null && task.Result.DataAsJson.ContainsKey("WarnWhenUsingSystemDatabase"))
+ Execute.OnTheUI(() =>
{
- if (task.Result.DataAsJson.Value<bool>("WarnWhenUsingSystemDatabase") == false)
- return;
- }
- Command.ExecuteCommand(new CreateDatabaseCommand());
+ if (task.Result != null && task.Result.DataAsJson.ContainsKey("WarnWhenUsingSystemDatabase"))
+ {
+ if (task.Result.DataAsJson.Value<bool>("WarnWhenUsingSystemDatabase") == false)
+ return;
+ }
+ Command.ExecuteCommand(new CreateDatabaseCommand());
+ });
}
else
{
16 Raven.Studio/Models/ServerModel.cs
View
@@ -136,13 +136,17 @@ public override Task TimerTickedAsync()
{
if (task.IsFaulted == false)
{
- if (task.Result != null &&
- task.Result.DataAsJson.ContainsKey("WarnWhenUsingSystemDatabase"))
+ Execute.OnTheUI(() =>
{
- if (task.Result.DataAsJson.Value<bool>("WarnWhenUsingSystemDatabase") ==
- false)
- UrlUtil.Navigate("/documents");
- }
+ if (task.Result != null &&
+ task.Result.DataAsJson.ContainsKey("WarnWhenUsingSystemDatabase"))
+ {
+ if (task.Result.DataAsJson.Value<bool>("WarnWhenUsingSystemDatabase") ==
+ false)
+ UrlUtil.Navigate("/documents");
+ }
+ });
+
}
else
{
Please sign in to comment.
Something went wrong with that request. Please try again.