Gestita pagina notifiche
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using salesbook.Shared.Core.Dto.Notification;
|
||||
using salesbook.Shared.Core.Entity;
|
||||
using salesbook.Shared.Core.Interface.IntegryApi;
|
||||
using salesbook.Shared.Core.Messages.Notification;
|
||||
using Shiny.Push;
|
||||
@@ -7,7 +7,7 @@ using Shiny.Push;
|
||||
namespace salesbook.Maui.Core.System.Notification.Push;
|
||||
|
||||
public class PushNotificationDelegate(
|
||||
IIntegryNotificationRestClient integryNotificationRestClient,
|
||||
IIntegryRegisterNotificationRestClient integryRegisterNotificationRestClient,
|
||||
IMessenger messenger
|
||||
) : IPushDelegate
|
||||
{
|
||||
@@ -20,10 +20,10 @@ public class PushNotificationDelegate(
|
||||
public Task OnReceived(PushNotification notification)
|
||||
{
|
||||
if (notification.Notification is null) return Task.CompletedTask;
|
||||
var pushNotification = new PushNotificationDTO
|
||||
var pushNotification = new WtbNotification
|
||||
{
|
||||
Title = notification.Notification.Title,
|
||||
Message = notification.Notification.Message
|
||||
Body = notification.Notification.Message
|
||||
};
|
||||
|
||||
messenger.Send(new NewPushNotificationMessage(pushNotification));
|
||||
@@ -33,7 +33,7 @@ public class PushNotificationDelegate(
|
||||
|
||||
public Task OnNewToken(string token)
|
||||
{
|
||||
integryNotificationRestClient.Register(token);
|
||||
integryRegisterNotificationRestClient.Register(token);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user