aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-09-01 10:46:32 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-09-08 09:01:01 +0200
commit913e2e9ae67de805d99039105c634c843009345e (patch)
tree24dca758e8db10165b84f745c584127874d64036
parent3bdfef910708eaba19daaf7d1d992cd4575af3b4 (diff)
downloadnextcloud-server-913e2e9ae67de805d99039105c634c843009345e.tar.gz
nextcloud-server-913e2e9ae67de805d99039105c634c843009345e.zip
Use an INotification to getCount() and markProcessed()
-rw-r--r--lib/private/notification/manager.php16
-rw-r--r--lib/public/notification/iapp.php12
2 files changed, 10 insertions, 18 deletions
diff --git a/lib/private/notification/manager.php b/lib/private/notification/manager.php
index 1946c4203d4..f14929642dc 100644
--- a/lib/private/notification/manager.php
+++ b/lib/private/notification/manager.php
@@ -155,31 +155,27 @@ class Manager implements IManager {
}
/**
- * @param string $appId
- * @param string $objectType
- * @param int $objectId
- * @param string $user
+ * @param INotification $notification
* @return null
*/
- public function markProcessed($appId, $objectType, $objectId, $user = '') {
+ public function markProcessed(INotification $notification) {
$apps = $this->getApps();
foreach ($apps as $app) {
- $app->markProcessed($appId, $objectType, $objectId, $user);
+ $app->markProcessed($notification);
}
}
/**
- * @param string $user
- * @param string $appId
+ * @param INotification $notification
* @return int
*/
- public function getCount($user, $appId = '') {
+ public function getCount(INotification $notification) {
$apps = $this->getApps();
$count = 0;
foreach ($apps as $app) {
- $count += $app->markProcessed($user, $appId);
+ $count += $app->markProcessed($notification);
}
return $count;
diff --git a/lib/public/notification/iapp.php b/lib/public/notification/iapp.php
index e2b0e89fc32..a4718a21b60 100644
--- a/lib/public/notification/iapp.php
+++ b/lib/public/notification/iapp.php
@@ -41,20 +41,16 @@ interface IApp {
public function notify(INotification $notification);
/**
- * @param string $appId
- * @param string $objectType
- * @param int $objectId
- * @param string $user
+ * @param INotification $notification
* @return null
* @since 8.2.0
*/
- public function markProcessed($appId, $objectType, $objectId, $user = '');
+ public function markProcessed(INotification $notification);
/**
- * @param string $user
- * @param string $appId
+ * @param INotification $notification
* @return int
* @since 8.2.0
*/
- public function getCount($user, $appId = '');
+ public function getCount(INotification $notification);
}