mirror of
https://github.com/bitwarden/android.git
synced 2024-12-20 16:21:55 +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();
|
StartPushService();
|
||||||
|
|
||||||
var pushNotification = Resolver.Resolve<IPushNotification>();
|
var pushNotification = Resolver.Resolve<IPushNotification>();
|
||||||
#if DEBUG
|
// Must unregister the previous instance first or else things wont work
|
||||||
// When running in debug mode you must unregister the previous instance first or else things wont work
|
|
||||||
// ref https://github.com/rdelrosario/xamarin-plugins/issues/65
|
// ref https://github.com/rdelrosario/xamarin-plugins/issues/65
|
||||||
pushNotification.Unregister();
|
|
||||||
#endif
|
|
||||||
if(Resolver.Resolve<IAuthService>().IsAuthenticated)
|
if(Resolver.Resolve<IAuthService>().IsAuthenticated)
|
||||||
{
|
{
|
||||||
|
pushNotification.Unregister();
|
||||||
pushNotification.Register();
|
pushNotification.Register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,6 +205,7 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
if(Device.OS == TargetPlatform.Android)
|
if(Device.OS == TargetPlatform.Android)
|
||||||
{
|
{
|
||||||
|
_pushNotification.Unregister();
|
||||||
_pushNotification.Register();
|
_pushNotification.Register();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue