Skip to content

Commit

Permalink
Ensure new tokens are stored properly when firebase updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Mar 26, 2024
1 parent c763bbb commit 4c190e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Shiny.Push/Platforms/Android/PushManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,12 @@ void DoInit()
if (this.NativeRegistrationToken == token || this.registrationRequest)
return;
var regToken = await this.provider.Register(token);
this.NativeRegistrationToken = token;
this.RegistrationToken = await this.provider.Register(token);
await this.services
.RunDelegates<IPushDelegate>(
x => x.OnNewToken(regToken),
x => x.OnNewToken(this.RegistrationToken),
this.logger
)
.ConfigureAwait(false);
Expand Down

0 comments on commit 4c190e8

Please sign in to comment.