Remove notification on unshare/unassign and add type hints
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
committed by
backportbot[bot]
parent
2326281e04
commit
3baf165577
@@ -257,6 +257,7 @@ class CardService {
|
||||
$card->setDeletedAt(time());
|
||||
$this->cardMapper->update($card);
|
||||
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $card, ActivityManager::SUBJECT_CARD_DELETE);
|
||||
$this->notificationHelper->markDuedateAsRead($card);
|
||||
$this->changeHelper->cardChanged($card->getId(), false);
|
||||
|
||||
$this->eventDispatcher->dispatch(
|
||||
@@ -339,6 +340,15 @@ class CardService {
|
||||
$card->setOrder($order);
|
||||
$card->setOwner($owner);
|
||||
$card->setDuedate($duedate);
|
||||
$resetDuedateNotification = false;
|
||||
if (
|
||||
$card->getDuedate() === null ||
|
||||
(new \DateTime($card->getDuedate())) != (new \DateTime($changes->getBefore()->getDuedate()))
|
||||
) {
|
||||
$card->setNotified(false);
|
||||
$resetDuedateNotification = true;
|
||||
}
|
||||
|
||||
if ($deletedAt !== null) {
|
||||
$card->setDeletedAt($deletedAt);
|
||||
}
|
||||
@@ -358,6 +368,9 @@ class CardService {
|
||||
|
||||
|
||||
$card = $this->cardMapper->update($card);
|
||||
if ($resetDuedateNotification) {
|
||||
$this->notificationHelper->markDuedateAsRead($card);
|
||||
}
|
||||
$this->changeHelper->cardChanged($card->getId(), true);
|
||||
|
||||
$this->eventDispatcher->dispatch(
|
||||
|
||||
Reference in New Issue
Block a user