Probably a better method to solve the update card title issue.
Signed-off-by: alexandru.puiu <alexandrup@newro.co>
This commit is contained in:
@@ -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'])) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user