mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 07:05:35 +03:00
Invoke logout message always on main thread.
This commit is contained in:
parent
6c496bea14
commit
2fb2d99541
4 changed files with 8 additions and 11 deletions
|
@ -178,10 +178,7 @@ namespace Bit.App
|
|||
private void Logout(string logoutMessage)
|
||||
{
|
||||
_authService.LogOut();
|
||||
Device.BeginInvokeOnMainThread(() =>
|
||||
{
|
||||
_pushNotification.Unregister();
|
||||
});
|
||||
_pushNotification.Unregister();
|
||||
Current.MainPage = new HomePage();
|
||||
if(!string.IsNullOrWhiteSpace(logoutMessage))
|
||||
{
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace Bit.App.Services
|
|||
else if(response.StatusCode == System.Net.HttpStatusCode.Forbidden
|
||||
|| response.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
{
|
||||
MessagingCenter.Send(Application.Current, "Logout", (string)null);
|
||||
Device.BeginInvokeOnMainThread(() => 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)
|
||||
{
|
||||
MessagingCenter.Send(Application.Current, "Logout", (string)null);
|
||||
Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(Application.Current, "Logout", (string)null));
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace Bit.App.Services
|
|||
else if(response.StatusCode == System.Net.HttpStatusCode.Forbidden
|
||||
|| response.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
{
|
||||
MessagingCenter.Send(Application.Current, "Logout", (string)null);
|
||||
Device.BeginInvokeOnMainThread(() => 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)
|
||||
{
|
||||
MessagingCenter.Send(Application.Current, "Logout", (string)null);
|
||||
Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(Application.Current, "Logout", (string)null));
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace Bit.App.Services
|
|||
if(cipher.StatusCode == System.Net.HttpStatusCode.Forbidden
|
||||
|| cipher.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
{
|
||||
MessagingCenter.Send(Application.Current, "Logout", (string)null);
|
||||
Device.BeginInvokeOnMainThread(() => 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)
|
||||
{
|
||||
MessagingCenter.Send(Application.Current, "Logout", (string)null);
|
||||
Device.BeginInvokeOnMainThread(() => 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)
|
||||
{
|
||||
MessagingCenter.Send(Application.Current, "Logout", (string)null);
|
||||
Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(Application.Current, "Logout", (string)null));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue