mirror of
https://github.com/bitwarden/android.git
synced 2024-12-20 08:12:26 +03:00
Still need to unregister push each time on android for some reason
This commit is contained in:
parent
42434229ce
commit
c26960380a
2 changed files with 3 additions and 4 deletions
|
@ -46,13 +46,11 @@ namespace Bit.Android
|
|||
StartPushService();
|
||||
|
||||
var pushNotification = Resolver.Resolve<IPushNotification>();
|
||||
#if DEBUG
|
||||
// When running in debug mode you must unregister the previous instance first or else things wont work
|
||||
// Must unregister the previous instance first or else things wont work
|
||||
// ref https://github.com/rdelrosario/xamarin-plugins/issues/65
|
||||
pushNotification.Unregister();
|
||||
#endif
|
||||
if(Resolver.Resolve<IAuthService>().IsAuthenticated)
|
||||
{
|
||||
pushNotification.Unregister();
|
||||
pushNotification.Register();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,6 +205,7 @@ namespace Bit.App.Pages
|
|||
|
||||
if(Device.OS == TargetPlatform.Android)
|
||||
{
|
||||
_pushNotification.Unregister();
|
||||
_pushNotification.Register();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue