[buddypress-trac] [BuddyPress] #574: Unread message numbers do not decrement in "My Messages" optionsbar

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sat Nov 27 01:26:46 UTC 2010


#574: Unread message numbers do not decrement in "My Messages" optionsbar
-------------------------+--------------------------------------------------
 Reporter:  jeffca       |       Owner:     
     Type:  defect       |      Status:  new
 Priority:  minor        |   Milestone:  1.3
Component:  Core         |     Version:     
 Keywords:  needs-patch  |  
-------------------------+--------------------------------------------------
Changes (by boonebgorges):

  * component:  => Core


Comment:

 jjj - the way things are currently set up, BP doesn't really 'know' what
 thread is being called up until the screen function is called up; the
 screen function, in turn, isn't defined until the parent item (the main
 Messages tab) and its name (eg Messages (2)) is already set.

 Aside from completely rewriting the way that navs and subnavs register
 themselves, there are two strategies:
 1) Reach into $bp->bp_nav and adjust the message count (after it's been
 registered but before it's been rendered). See 574-1.diff to see what this
 might look like.
 2) Hook into the loading process *before* the messages nav is created with
 a function that checks to see (based on the action_variables etc) whether
 you're trying to view a single message, and if so it calls
 messages_mark_thread_read() on that thread.

 Neither is great, but it strikes me that (1) has fewer potential problems
 (even though it's a bit uglier). I would rather not mess with load order
 if I can help it.

 Thoughts?

-- 
Ticket URL: <https://trac.buddypress.org/ticket/574#comment:10>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list