Different icons for notifications (#4632)

* Different icons for notifications

Closes #2510.

* Fix version appendix for SVG use attributes

* Fix SVGUse TagHelper

* Update icons
This commit is contained in:
d11n
2023-02-21 03:06:27 +01:00
committed by GitHub
parent cff46f2d59
commit 5c61de3ae9
20 changed files with 141 additions and 122 deletions

View File

@@ -40,7 +40,7 @@ namespace BTCPayServer.Services.Notifications
return await _memoryCache.GetOrCreateAsync(cacheKey, async entry =>
{
var resp = await GetNotifications(new NotificationsQuery()
var resp = await GetNotifications(new NotificationsQuery
{
Seen = false,
Skip = 0,
@@ -119,7 +119,6 @@ namespace BTCPayServer.Services.Notifications
return (queryable, queryable2);
}
public async Task<List<NotificationViewModel>> ToggleSeen(NotificationsQuery notificationsQuery, bool? setSeen)
{
await using var dbContext = _factory.CreateContext();
@@ -156,7 +155,13 @@ namespace BTCPayServer.Services.Notifications
if (handler is null)
return null;
var notification = JsonConvert.DeserializeObject(ZipUtils.Unzip(data.Blob), handler.NotificationBlobType);
var obj = new NotificationViewModel { Id = data.Id, Created = data.Created, Seen = data.Seen };
var obj = new NotificationViewModel
{
Id = data.Id,
Type = data.NotificationType,
Created = data.Created,
Seen = data.Seen
};
handler.FillViewModel(notification, obj);
return obj;
}