From 40fa0331b12fe72fa0d2754dd970b279cd9fd632 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 29 Jul 2024 08:54:42 -0400 Subject: [PATCH] Fixup --- lib/philomena/notifications.ex | 4 ++-- lib/philomena/notifications/category.ex | 6 +++--- lib/philomena_web/templates/notification/_image.html.slime | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/philomena/notifications.ex b/lib/philomena/notifications.ex index ea0b6029..cbed7413 100644 --- a/lib/philomena/notifications.ex +++ b/lib/philomena/notifications.ex @@ -41,14 +41,14 @@ defmodule Philomena.Notifications do ## Examples iex> unread_notifications_for_user(user, page_size: 10) - %{ + [ channel_live: [], forum_post: [%ForumPostNotification{...}, ...], forum_topic: [%ForumTopicNotification{...}, ...], gallery_image: [], image_comment: [%ImageCommentNotification{...}, ...], image_merge: [] - } + ] """ def unread_notifications_for_user(user, pagination) do diff --git a/lib/philomena/notifications/category.ex b/lib/philomena/notifications/category.ex index 249dd838..b16649c0 100644 --- a/lib/philomena/notifications/category.ex +++ b/lib/philomena/notifications/category.ex @@ -67,18 +67,18 @@ defmodule Philomena.Notifications.Category do ## Examples iex> unread_notifications_for_user(user, page_size: 10) - %{ + [ channel_live: [], forum_post: [%ForumPostNotification{...}, ...], forum_topic: [%ForumTopicNotification{...}, ...], gallery_image: [], image_comment: [%ImageCommentNotification{...}, ...], image_merge: [] - } + ] """ def unread_notifications_for_user(user, pagination) do - Map.new(categories(), fn category -> + Enum.map(categories(), fn category -> results = category |> query_for_category_and_user(user) diff --git a/lib/philomena_web/templates/notification/_image.html.slime b/lib/philomena_web/templates/notification/_image.html.slime index d0007f08..01f72dd9 100644 --- a/lib/philomena_web/templates/notification/_image.html.slime +++ b/lib/philomena_web/templates/notification/_image.html.slime @@ -8,7 +8,7 @@ div ' Someone | merged # - = source.id + => source.id ' into strong>