FIX: Always ensure notifications are treated as read once clicked

UX: improve messaging so notifications list is far more stable
PERF: improve performance of notifcation lookup queries

- Add feature "SetTransientHeader" that allows shipping info to server
   in the next Ajax request
- remove local storage hack used for notifications
- amend lookupStale to return hydrated objects, move logic into store
- stop magically clearing various notifications (likes, invitee accepted, group_summary, granted badge)
This commit is contained in:
Sam
2016-02-15 19:29:35 +11:00
parent 1f062ae2fd
commit dd6ebde824
15 changed files with 203 additions and 86 deletions

View File

@@ -0,0 +1,6 @@
class AddUnreadPmIndexToNotifications < ActiveRecord::Migration
def change
# create index idxtmp on notifications(user_id, id) where notification_type = 6 AND NOT read
add_index :notifications, [:user_id, :id], unique: true, where: 'notification_type = 6 AND NOT read'
end
end