mediawiki-extensions-Echo/modules/controller
Moriel Schottlender 951f146b54 Emit sortChange only for read/unread actions
Do not emit sortChange for toggleSeen, because every sortChange
creates a fake widget with a flipped 'read' state. There is no
reason to emit the sortChange event in toggleSeen anyways so it
is safer when only emitted in togglRead.

Also, make sure the controller always updates the correct seenTime
from the API when fetching local notifications. This was done for
the special page method but was overlooked for the fetching of local
notifications. For the most part, it shouldn't be affecting too much
because the SeenTimeModel is initialized with wgEchoSeenTime (which
is local) but updating the controller with the API response is the
safe thing to do, and will also cover cases where a tab was open,
notifications were seen in a different tab, and now the popup was
reopened in a "stale" tab again.

Bug: T143067
Change-Id: Ie261e32db28926d04fe14f7badd9d287ddc52749
2016-08-15 16:53:09 -07:00
..
mw.echo.Controller.js Emit sortChange only for read/unread actions 2016-08-15 16:53:09 -07:00