mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
Fixup
This commit is contained in:
parent
fe59b046f7
commit
40fa0331b1
3 changed files with 6 additions and 6 deletions
|
@ -41,14 +41,14 @@ defmodule Philomena.Notifications do
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
iex> unread_notifications_for_user(user, page_size: 10)
|
iex> unread_notifications_for_user(user, page_size: 10)
|
||||||
%{
|
[
|
||||||
channel_live: [],
|
channel_live: [],
|
||||||
forum_post: [%ForumPostNotification{...}, ...],
|
forum_post: [%ForumPostNotification{...}, ...],
|
||||||
forum_topic: [%ForumTopicNotification{...}, ...],
|
forum_topic: [%ForumTopicNotification{...}, ...],
|
||||||
gallery_image: [],
|
gallery_image: [],
|
||||||
image_comment: [%ImageCommentNotification{...}, ...],
|
image_comment: [%ImageCommentNotification{...}, ...],
|
||||||
image_merge: []
|
image_merge: []
|
||||||
}
|
]
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def unread_notifications_for_user(user, pagination) do
|
def unread_notifications_for_user(user, pagination) do
|
||||||
|
|
|
@ -67,18 +67,18 @@ defmodule Philomena.Notifications.Category do
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
iex> unread_notifications_for_user(user, page_size: 10)
|
iex> unread_notifications_for_user(user, page_size: 10)
|
||||||
%{
|
[
|
||||||
channel_live: [],
|
channel_live: [],
|
||||||
forum_post: [%ForumPostNotification{...}, ...],
|
forum_post: [%ForumPostNotification{...}, ...],
|
||||||
forum_topic: [%ForumTopicNotification{...}, ...],
|
forum_topic: [%ForumTopicNotification{...}, ...],
|
||||||
gallery_image: [],
|
gallery_image: [],
|
||||||
image_comment: [%ImageCommentNotification{...}, ...],
|
image_comment: [%ImageCommentNotification{...}, ...],
|
||||||
image_merge: []
|
image_merge: []
|
||||||
}
|
]
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def unread_notifications_for_user(user, pagination) do
|
def unread_notifications_for_user(user, pagination) do
|
||||||
Map.new(categories(), fn category ->
|
Enum.map(categories(), fn category ->
|
||||||
results =
|
results =
|
||||||
category
|
category
|
||||||
|> query_for_category_and_user(user)
|
|> query_for_category_and_user(user)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
div
|
div
|
||||||
' Someone
|
' Someone
|
||||||
| merged #
|
| merged #
|
||||||
= source.id
|
=> source.id
|
||||||
' into
|
' into
|
||||||
|
|
||||||
strong>
|
strong>
|
||||||
|
|
Loading…
Reference in a new issue