Iniziata implementazione notifiche firebase
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
@using salesbook.Shared.Components.Layout.Spinner
|
||||
@inject IFormFactor FormFactor
|
||||
@inject INetworkService NetworkService
|
||||
@inject IFirebaseNotificationService FirebaseNotificationService
|
||||
|
||||
<SpinnerLayout FullScreen="true" />
|
||||
|
||||
@@ -11,6 +12,15 @@
|
||||
{
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
await FirebaseNotificationService.InitFirebase();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine($"Firebase init: {e.Message}");
|
||||
}
|
||||
|
||||
var lastSyncDate = LocalStorage.Get<DateTime>("last-sync");
|
||||
|
||||
if (!FormFactor.IsWeb() && NetworkService.IsNetworkAvailable() && lastSyncDate.Equals(DateTime.MinValue))
|
||||
|
||||
Reference in New Issue
Block a user