Skip to content

Commit

Permalink
chore: removed unnecessary lastUpdate variable now that it is no long…
Browse files Browse the repository at this point in the history
…er checked in the getter
  • Loading branch information
khatruong2009 committed Sep 6, 2023
1 parent 41a5f8c commit 36f6f8d
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class DefaultRemoteLoggingConstraintProvider
final AWSCredentialsProvider _credentialsProvider;

LoggingConstraint? _loggingConstraint;
DateTime? _lastUpdated;

/// The signer to sign the request.
static const _signer = AWSSigV4Signer();
Expand Down Expand Up @@ -75,7 +74,6 @@ class DefaultRemoteLoggingConstraintProvider
final constraint = await _fetchConstraintFromEndpoint();
if (constraint != null) {
_loggingConstraint = constraint;
_lastUpdated = DateTime.now();
await _saveConstraintLocally(constraint);
}
// ignore: avoid_catches_without_on_clauses
Expand Down Expand Up @@ -124,7 +122,7 @@ class DefaultRemoteLoggingConstraintProvider

@override
LoggingConstraint? get loggingConstraint {
if (_loggingConstraint != null && _lastUpdated != null) {
if (_loggingConstraint != null) {
return _loggingConstraint;
}
// Load from local storage synchronously
Expand Down

0 comments on commit 36f6f8d

Please sign in to comment.