mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Add messages tab to the new user menu (#17850)
Some of the changes in this PR are extracted from https://github.com/discourse/discourse/pull/17379. Similar to the bookmarks tab in the new user menu, the messages tab also displays a mix of notifications and messages. When there are unread message notifications, the tab displays all of these notifications at the top and fills the remaining space in the menu with a list of the user's messages. The bubble/badge count on the messages tab indicates how many unread message notifications there are.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
class TopicQuery
|
||||
module PrivateMessageLists
|
||||
def list_private_messages(user)
|
||||
def list_private_messages(user, &blk)
|
||||
list = private_messages_for(user, :user)
|
||||
list = not_archived(list, user)
|
||||
|
||||
@ -14,7 +14,7 @@ class TopicQuery
|
||||
)
|
||||
SQL
|
||||
|
||||
create_list(:private_messages, {}, list)
|
||||
create_list(:private_messages, {}, list, &blk)
|
||||
end
|
||||
|
||||
def list_private_messages_archive(user)
|
||||
|
Reference in New Issue
Block a user