Commit graph

13 commits

Author SHA1 Message Date
addshore
eacec0a223 add setNotificationTimestampsForUser to WatchedItemStore
Bug: T134387
Change-Id: Ia6abe7687b51aabe67e8461375075692db28c9a2
2016-05-18 08:50:46 +00:00
addshore
818984e5cb Remove WatchedItemStore::getDefaultInstance
Change-Id: I0c7d706fabee8d1f6fcfbc4c568f375953de8058
2016-05-06 08:47:37 +00:00
jenkins-bot
98c62a6542 Merge "Add WatchedItemStore::getWatchedItemsForUser" 2016-03-23 15:45:45 +00:00
addshore
659fd5ec9c Add WatchedItemStore::getWatchedItemsForUser
This method is also no used in SpecialEditWatchlist

Unit and Integration tests have also been added.

Bug: T129481
Change-Id: Ica136b6fee63be8de4c2fe502288dd2318d99114
2016-03-23 14:01:31 +00:00
Leszek Manicki
b92ae1501e Use WatchedItemStore in ApiQueryInfo::getWatchedInfo
Adds a method for getting watchlist's notification timestamps
for a batch of LinkTargets.

Bug: T129482
Change-Id: I1f84212e7879a84b34bb3b53859069fcea282bba
2016-03-21 10:25:54 +01:00
Leszek Manicki
7d4e225cb9 Add WatchedItemStore::countVisitingWatchersMultiple
This is for batch counting of visiting watchers, following the change
made in I2868c31fc09121de381d822e8f49194e3022bb42.
Query/logic has been extracted from ApiQueryInfo.

Bug: T129482
Change-Id: Ia9a534f5edb7af3cb7bf86be358dddb5d8c259cf
2016-03-17 16:17:38 +00:00
addshore
bfa8662b73 Add WatchedItemStore::countWatchedItems
This method counts the number of individual items
that a user is watching.
A subject and corresponding talk page would mean a
count of 2

Unit and integration tests are also added here

Bug: T129481
Change-Id: I4b55318dc1d1c5abab1c5da16cebf1a43ddf9248
2016-03-15 15:58:51 +00:00
addshore
846d373c28 Add countUnreadNotifications to WatchedItemStore
This query / logic has been extracted from
ApiQueryUserInfo.

Unit & Integration tests have also been added.

Relating to the task linked this is the last change
needed in this ApiQueryUserInfo!

Bug: T129482
Change-Id: I91aa109416c16cd1f257c9de46669e35d6fd34d7
2016-03-14 16:00:47 +00:00
addshore
0b852c5717 Move countVisitingWatchers to WatchedItemStore
Also adds tests

Bug: T129479
Change-Id: I2868c31fc09121de381d822e8f49194e3022bb42
2016-03-14 15:56:43 +00:00
addshore
6e2d6a0b44 Move counting of watchers to WatchedItemStore
Also adds tests

Bug: T129479
Bug: T129482
Change-Id: I5a465773599cce9f8c9e94847cede6d12282c827
2016-03-14 15:56:16 +00:00
addshore
8d984cebb2 Uncache things in WatchedItemStore::updateNotificationTimestamp
When the notification timestamp for a LinkTarget is
updated all items relating to that LinkTarget should
be uncached!..

This also switches this class from a BagOStuff to
a HashBagOStuff as this cache index is only maintained
per process..

Change-Id: I5dc58e018a6a4a15903abc1e0b326b4220abc75e
2016-03-14 15:13:19 +00:00
addshore
a683b11b23 Move EmailNotification::updateWatchlistTimestamp to WatchedItemStore
Flow is the only thing remaining that uses this deprecated method.

Change-Id: Iaa4e1e34cb3f2a91c163565fb0107c500e3852d7
2016-03-08 18:44:05 +00:00
addshore
fee0afdc8a Move WatchedItem logic to WatchedItemStore
This also removes assumptions that when a page
in one Namespace should be watched / removed
that the page in the talk / subject ns for the
page should have the same action applied

This should maintain all backward compatability
for the WatchedItem class

This also includes tests written by:
 - WMDE-leszek
 - Addshore

Bug: T127956
Change-Id: Iad9abafe4417bb479151a3bfbee6e1c78a3afe3c
2016-03-08 15:41:22 +00:00