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>