Fixes
This commit is contained in:
@@ -84,12 +84,9 @@ class QuotationProvider extends ChangeNotifier {
|
||||
return _lastRequestSignature == _signature(_pendingIntent!);
|
||||
}
|
||||
|
||||
bool get hasLiveQuote =>
|
||||
_isLoaded &&
|
||||
!_isExpired &&
|
||||
!_quotation.isLoading &&
|
||||
_quotation.error == null &&
|
||||
quotation != null;
|
||||
bool get isReady => _isLoaded && !_isExpired && !_quotation.isLoading && _quotation.error == null;
|
||||
|
||||
bool get hasLiveQuote => isReady && quotation != null;
|
||||
|
||||
Duration? get timeToExpire {
|
||||
final expiresAt = _quoteExpiry;
|
||||
@@ -176,9 +173,10 @@ class QuotationProvider extends ChangeNotifier {
|
||||
|
||||
void refreshNow({bool force = true}) {
|
||||
_debounceTimer?.cancel();
|
||||
if (!_organizationAttached) return;
|
||||
if (_pendingIntent == null) {
|
||||
_reset();
|
||||
if (!canRequestQuote) {
|
||||
if (_pendingIntent == null) {
|
||||
_reset();
|
||||
}
|
||||
return;
|
||||
}
|
||||
unawaited(_requestQuotation(_pendingIntent!, force: force));
|
||||
|
||||
Reference in New Issue
Block a user