1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Notifications: Updated watch control to show parent status

This commit is contained in:
Dan Brown
2023-08-09 14:53:31 +01:00
parent ecab2c8e42
commit c47b3f805a
13 changed files with 213 additions and 122 deletions

View File

@ -3,7 +3,7 @@
namespace BookStack\Activity\Controllers;
use BookStack\Activity\Models\Watch;
use BookStack\Activity\Tools\UserWatchOptions;
use BookStack\Activity\Tools\UserEntityWatchOptions;
use BookStack\App\Model;
use BookStack\Entities\Models\Entity;
use BookStack\Http\Controller;
@ -20,8 +20,8 @@ class WatchController extends Controller
]);
$watchable = $this->getValidatedModelFromRequest($request);
$watchOptions = new UserWatchOptions(user());
$watchOptions->updateEntityWatchLevel($watchable, $requestData['level']);
$watchOptions = new UserEntityWatchOptions(user(), $watchable);
$watchOptions->updateWatchLevel($requestData['level']);
$this->showSuccessNotification(trans('activities.watch_update_level_notification'));