Fix aggregation of anime watch history items
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good

This commit is contained in:
Timothy Warren 2020-04-21 20:10:01 -04:00
parent da15c45fd9
commit 3f2c23ab96
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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)
{