Skip to content

Commit

Permalink
fix new warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
f2calv committed Jan 12, 2024
1 parent b577aad commit 0873bbd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public async Task<bool> LoginAsync()

_logger.LogDebug("Authorisation granted or not required (if the saved access token already available)");

if (credential.Token.IsExpired(credential.Flow.Clock))
if (credential.Token.IsStale)
{
_logger.LogWarning("The access token has expired, refreshing it");
if (await credential.RefreshTokenAsync(CancellationToken.None))
Expand Down Expand Up @@ -240,7 +240,7 @@ public Task<List<Album>> GetSharedAlbumsAsync(int pageSize = defaultPageSizeAlbu

string GetUrl(string uri, int? pageSize = defaultPageSizeAlbums, bool excludeNonAppCreatedData = false, string? pageToken = null)
{
var queryParams = new Dictionary<string, string>(3);
var queryParams = new Dictionary<string, string?>(3);
if (pageSize.HasValue && pageSize != defaultPageSizeAlbums) queryParams.Add(nameof(pageSize), pageSize.Value.ToString());
if (excludeNonAppCreatedData) queryParams.Add(nameof(excludeNonAppCreatedData), excludeNonAppCreatedData.ToString());
if (!string.IsNullOrWhiteSpace(pageToken)) queryParams.Add(nameof(pageToken), pageToken!);//todo: nullability look further into this
Expand Down

0 comments on commit 0873bbd

Please sign in to comment.