props.setAttachment(media)}
- />
- )}
+ itemContent={(_, notification) => {
+ let shadow = {}
+ if (marker) {
+ if (marker.unread_count && pleromaUnreads.includes(notification.id)) {
+ shadow = { boxShadow: '4px 0 2px var(--tw-shadow-color) inset' }
+ } else if (parseInt(marker.last_read_id) < parseInt(notification.id)) {
+ shadow = { boxShadow: '4px 0 2px var(--tw-shadow-color) inset' }
+ }
+ }
+
+ return (
+
+ props.setAttachment(media)}
+ />
+
+ )
+ }}
/>
) : (
diff --git a/renderer/entities/marker.ts b/renderer/entities/marker.ts
new file mode 100644
index 00000000..41a78ea9
--- /dev/null
+++ b/renderer/entities/marker.ts
@@ -0,0 +1,6 @@
+export type Marker = {
+ last_read_id: string
+ version: number
+ updated_at: string
+ unread_count?: number
+}