From 2325c8f4ec31ce04dfe9db2f88d8a8710b7e562d Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Tue, 21 Apr 2020 20:10:01 -0400 Subject: [PATCH] Fix aggregation of anime watch history items --- CHANGELOG.md | 2 ++ .../API/Kitsu/Transformer/AnimeHistoryTransformer.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52ddbd71..2a39f112 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,12 @@ ## Version 5 * Updated PHP requirement to 7.4 +* Added anime history view ## Version 4.2 * Updated dependencies * Updated PHP requirement to 7.3 +* Added option to automatically set dark mode based on the OS setting ## Version 4.1 * Added optional dark theme diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php index f8af2635..588008a2 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php @@ -69,12 +69,12 @@ class AnimeHistoryTransformer { protected function aggregate (array $singles): array { $output = []; - $prevTitle = ''; $count = count($singles); for ($i = 0; $i < $count; $i++) { $entry = $singles[$i]; + $prevTitle = $entry['title']; $nextId = $i + 1; if ($nextId < $count) {