Merge pull request #3907 from matthewburnett/GooglePhotos-patch

Fix empty albums list
This commit is contained in:
Jaex 2019-01-24 01:40:41 +03:00 committed by GitHub
commit 33630b84ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,11 +131,11 @@ public List<GooglePhotosAlbumInfo> GetAlbumList()
if (!string.IsNullOrEmpty(response))
{
GooglePhotosAlbums albums = JsonConvert.DeserializeObject<GooglePhotosAlbums>(response);
GooglePhotosAlbums albumsResponse = JsonConvert.DeserializeObject<GooglePhotosAlbums>(response);
if (albums.albums != null)
if (albumsResponse.albums != null)
{
foreach (GooglePhotosAlbum album in albums.albums)
foreach (GooglePhotosAlbum album in albumsResponse.albums)
{
GooglePhotosAlbumInfo AlbumInfo = new GooglePhotosAlbumInfo
{
@ -148,8 +148,8 @@ public List<GooglePhotosAlbumInfo> GetAlbumList()
albumList.Add(AlbumInfo);
}
}
pageToken = albums.nextPageToken;
}
pageToken = albumsResponse.nextPageToken;
}
}
while (!string.IsNullOrEmpty(pageToken));