Opened 16 years ago
Closed 15 years ago
#2082 closed defect (bug) (fixed)
Activity: @mentions (atme) displays new count - if activity with mention was deleted
| Reported by: | nuprn1 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.5 |
| Component: | Activity | Version: | |
| Severity: | Keywords: | ||
| Cc: |
Description
Create an @username mention with one user
delete activity
log in as mentioned user - under the main Activity component the counter displays 1 new (when no atme activity is present) but under the profile > activity subnav - no counter is displayed.
Change History (4)
#2
@
15 years ago
- Component → Activity
- Priority major → normal
- Resolution fixed
- Status closed → reopened
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(In [3468]) Decreases new mention count when activity items are deleted. Fixes #2082