Dedupe last used tags

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2023-04-18 18:27:51 -07:00
parent d6f51cf943
commit ee13dca9ff

View file

@ -245,7 +245,7 @@ class Listener {
$lastUsedTags = json_decode($lastUsedTags, true);
array_unshift($lastUsedTags, $tag->getId());
array_unique($lastUsedTags);
$lastUsedTags = array_unique($lastUsedTags);
$lastUsedTags = array_slice($lastUsedTags, 0, 10);
$this->config->setUserValue($actor, 'systemtags', 'last_used', json_encode($lastUsedTags));