[buddypress-trac] [BuddyPress] #2082: Activity: @mentions (atme) displays new count - if activity with mention was deleted
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Sun May 15 19:58:05 UTC 2011
#2082: Activity: @mentions (atme) displays new count - if activity with mention
was deleted
-----------------------+----------------------
Reporter: nuprn1 | Owner:
Type: defect | Status: reopened
Priority: normal | Milestone: 1.3
Component: Activity | Version:
Resolution: | Keywords:
-----------------------+----------------------
Changes (by boonebgorges):
* priority: major => normal
* resolution: fixed =>
* status: closed => reopened
* component: => Activity
Comment:
I was just poking around and I realized that this solution is flawed.
Deleting an activity item with a mention will reduce the mention count,
whether or not the mentioned user has viewed the item. This comes about
because new_mention_count is stored as a dumb integer - it doesn't know
which mentions it refers to.
I think that the proper fix is probably to add a usermeta along the lines
of new_mentions, which keeps track of specific activity_ids in an array.
new_mention_count can be maintained for backward compatibility. But
deleting activity items (or adding new mentions) will no longer simply
increment this number. Instead, the activity_id of the new/deleted item
will be compared against activity_ids, removed or added as necessary, and
new_mention_count will be set as count( $new_mentions ). This is about as
good as we can do, given that mention data is not stored separately in the
db.
--
Ticket URL: <https://trac.buddypress.org/ticket/2082#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list