Probably a better method to solve the update card title issue.

Signed-off-by: alexandru.puiu <alexandrup@newro.co>
This commit is contained in:
alexandru.puiu
2019-08-27 10:43:14 +03:00
parent d082e3f805
commit d6b0155e9d
2 changed files with 10 additions and 1 deletions

View File

@@ -179,7 +179,7 @@ class ActivityManager {
$subject = $ownActivity ? $this->l10n->t('You have deleted card {card} in stack {stack} on board {board}') : $this->l10n->t('{user} has deleted card {card} in stack {stack} on board {board}');
break;
case self::SUBJECT_CARD_UPDATE_TITLE:
$subject = $ownActivity ? $this->l10n->t('You have renamed the card {before} to {after}') : $this->l10n->t('{user} has renamed the card {before} to {after}');
$subject = $ownActivity ? $this->l10n->t('You have renamed the card {before} to {card}') : $this->l10n->t('{user} has renamed the card {before} to {card}');
break;
case self::SUBJECT_CARD_UPDATE_DESCRIPTION:
if (!isset($subjectParams['before'])) {

View File

@@ -2,6 +2,8 @@
/**
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
*
* @copyright Copyright (c) 2019 Alexandru Puiu <alexpuiu20@yahoo.com>
*
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
@@ -342,6 +344,13 @@ class DeckProvider implements IProvider {
'name' => $subjectParams['after']
];
}
if (array_key_exists('card', $subjectParams) && $event->getSubject() === ActivityManager::SUBJECT_CARD_UPDATE_TITLE) {
$params['card'] = [
'type' => 'highlight',
'id' => $subjectParams['after'],
'name' => $subjectParams['after']
];
}
return $params;
}