From 81f2f2b1bbb15b7e70120c05828a6045f3d1311b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 19 Jul 2016 22:00:28 -0400 Subject: [PATCH] Moved BeginInvokeOnMainThread to App.cs --- src/App/App.cs | 2 +- src/App/Services/FolderService.cs | 4 ++-- src/App/Services/SiteService.cs | 4 ++-- src/App/Services/SyncService.cs | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/App/App.cs b/src/App/App.cs index 8407fc463..76fb9f5bd 100644 --- a/src/App/App.cs +++ b/src/App/App.cs @@ -71,7 +71,7 @@ namespace Bit.App MessagingCenter.Subscribe(Current, "Logout", (sender, args) => { - Logout(args); + Device.BeginInvokeOnMainThread(() => Logout(args)); }); } diff --git a/src/App/Services/FolderService.cs b/src/App/Services/FolderService.cs index 7b5f1dd6a..10e5eb162 100644 --- a/src/App/Services/FolderService.cs +++ b/src/App/Services/FolderService.cs @@ -75,7 +75,7 @@ namespace Bit.App.Services else if(response.StatusCode == System.Net.HttpStatusCode.Forbidden || response.StatusCode == System.Net.HttpStatusCode.Unauthorized) { - Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(Application.Current, "Logout", (string)null)); + MessagingCenter.Send(Application.Current, "Logout", (string)null); } return response; @@ -91,7 +91,7 @@ namespace Bit.App.Services else if(response.StatusCode == System.Net.HttpStatusCode.Forbidden || response.StatusCode == System.Net.HttpStatusCode.Unauthorized) { - Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(Application.Current, "Logout", (string)null)); + MessagingCenter.Send(Application.Current, "Logout", (string)null); } return response; diff --git a/src/App/Services/SiteService.cs b/src/App/Services/SiteService.cs index 128c801da..a9e07e3c7 100644 --- a/src/App/Services/SiteService.cs +++ b/src/App/Services/SiteService.cs @@ -82,7 +82,7 @@ namespace Bit.App.Services else if(response.StatusCode == System.Net.HttpStatusCode.Forbidden || response.StatusCode == System.Net.HttpStatusCode.Unauthorized) { - Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(Application.Current, "Logout", (string)null)); + MessagingCenter.Send(Application.Current, "Logout", (string)null); } return response; @@ -98,7 +98,7 @@ namespace Bit.App.Services else if(response.StatusCode == System.Net.HttpStatusCode.Forbidden || response.StatusCode == System.Net.HttpStatusCode.Unauthorized) { - Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(Application.Current, "Logout", (string)null)); + MessagingCenter.Send(Application.Current, "Logout", (string)null); } return response; diff --git a/src/App/Services/SyncService.cs b/src/App/Services/SyncService.cs index 45e4a8adf..5678fe538 100644 --- a/src/App/Services/SyncService.cs +++ b/src/App/Services/SyncService.cs @@ -59,7 +59,7 @@ namespace Bit.App.Services if(cipher.StatusCode == System.Net.HttpStatusCode.Forbidden || cipher.StatusCode == System.Net.HttpStatusCode.Unauthorized) { - Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(Application.Current, "Logout", (string)null)); + MessagingCenter.Send(Application.Current, "Logout", (string)null); } return false; @@ -146,7 +146,7 @@ namespace Bit.App.Services if(ciphers.StatusCode == System.Net.HttpStatusCode.Forbidden || ciphers.StatusCode == System.Net.HttpStatusCode.Unauthorized) { - Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(Application.Current, "Logout", (string)null)); + MessagingCenter.Send(Application.Current, "Logout", (string)null); } return false; @@ -191,7 +191,7 @@ namespace Bit.App.Services if(ciphers.StatusCode == System.Net.HttpStatusCode.Forbidden || ciphers.StatusCode == System.Net.HttpStatusCode.Unauthorized) { - Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(Application.Current, "Logout", (string)null)); + MessagingCenter.Send(Application.Current, "Logout", (string)null); } return false;