File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
pkgs/unified_analytics/lib/src Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ abstract class Analytics {
150
150
/// run or when the message has been updated
151
151
String get getConsentMessage;
152
152
153
- /// Returns true if it is OK to send an analytics message. Do not cache,
153
+ /// Returns true if it is OK to send an analytics message. Do not cache,
154
154
/// as this depends on factors that can change, such as the configuration
155
155
/// file contents.
156
156
bool get okToSend;
@@ -382,8 +382,9 @@ class AnalyticsImpl implements Analytics {
382
382
@override
383
383
Future <List <Survey >> fetchAvailableSurveys () async {
384
384
final List <Survey > surveysToShow = [];
385
- final LogFileStats ? logFileStats = _logHandler. logFileStats () ;
385
+ if ( ! okToSend) return surveysToShow ;
386
386
387
+ final LogFileStats ? logFileStats = _logHandler.logFileStats ();
387
388
if (logFileStats == null ) return [];
388
389
389
390
for (final Survey survey in await _surveyHandler.fetchSurveyList ()) {
You can’t perform that action at this time.
0 commit comments