Group notifications by updated_at
The notifications need to be grouped by the same date as they are sorted, otherwise the date used for the group doesn't match all timestamps in the group and also the groups are sorted by the wrong date. This fixes #7647, a regression of #7568. closes #7648
This commit is contained in:
parent
c9423bfdd2
commit
0f688b9d73
2 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ after you've upgraded.
|
|||
## Refactor
|
||||
* Remove title from profile photo upload button [#7551](https://github.com/diaspora/diaspora/pull/7551)
|
||||
* Remove Internet Explorer workarounds [#7557](https://github.com/diaspora/diaspora/pull/7557)
|
||||
* Sort notifications by last interaction [#7568](https://github.com/diaspora/diaspora/pull/7568)
|
||||
* Sort notifications by last interaction [#7568](https://github.com/diaspora/diaspora/pull/7568) [#7648](https://github.com/diaspora/diaspora/pull/7648)
|
||||
* Remove tiff support from photos [#7576](https://github.com/diaspora/diaspora/pull/7576)
|
||||
* Remove reference from reshares when original post is deleted [#7578](https://github.com/diaspora/diaspora/pull/7578)
|
||||
* Merge migrations from before 0.6.0.0 to CreateSchema [#7580](https://github.com/diaspora/diaspora/pull/7580)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class NotificationsController < ApplicationController
|
|||
|
||||
pager.replace(result)
|
||||
end
|
||||
@group_days = @notifications.group_by{|note| note.created_at.strftime('%Y-%m-%d')}
|
||||
@group_days = @notifications.group_by {|note| note.updated_at.strftime("%Y-%m-%d") }
|
||||
|
||||
@unread_notification_count = current_user.unread_notifications.count
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue