fix logic to fetch all followed artists

This commit is contained in:
me 2023-09-28 14:35:25 -04:00
parent 38493f9dd7
commit cb43ebee7e

View File

@ -51,11 +51,12 @@ class ArtistQueries {
return page.items?.toList() ?? [];
}
following.addAll(page.items ?? []);
while (page?.isLast != true) {
following.addAll(page?.items ?? []);
page = await spotify.me
.following(FollowingType.artist)
.getPage(50, page?.after ?? '');
following.addAll(page.items ?? []);
}
return following;