mirror of
https://github.com/bitwarden/mobile
synced 2026-01-08 19:43:56 +00:00
Proper conditions for push reregistration. Added fix for app compat crash on resume from sleep while app was open.
This commit is contained in:
@@ -102,6 +102,12 @@ namespace Bit.App
|
||||
|
||||
protected async override void OnResume()
|
||||
{
|
||||
base.OnResume();
|
||||
|
||||
// workaround for app compat bug
|
||||
// ref https://forums.xamarin.com/discussion/62414/app-resuming-results-in-crash-with-formsappcompatactivity
|
||||
await Task.Delay(10);
|
||||
|
||||
// Handle when your app resumes
|
||||
Debug.WriteLine("OnResume");
|
||||
|
||||
|
||||
@@ -205,7 +205,6 @@ namespace Bit.App.Pages
|
||||
|
||||
if(Device.OS == TargetPlatform.Android)
|
||||
{
|
||||
_pushNotification.Unregister();
|
||||
_pushNotification.Register();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user