From e99711e317aa149b2319062f76f5760db32db75f Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Tue, 7 Jun 2022 13:36:23 +0800 Subject: [PATCH] Fix private members not named correctly --- app/lib/use_case/update_missing_metadata.dart | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/lib/use_case/update_missing_metadata.dart b/app/lib/use_case/update_missing_metadata.dart index a0388338..f20aff37 100644 --- a/app/lib/use_case/update_missing_metadata.dart +++ b/app/lib/use_case/update_missing_metadata.dart @@ -52,11 +52,11 @@ class UpdateMissingMetadata { try { // since we need to download multiple images in their original size, // we only do it with WiFi - await ensureWifi(); - await ensureBattery(); + await _ensureWifi(); + await _ensureBattery(); KiwiContainer().resolve().fire( const MetadataTaskStateChangedEvent(MetadataTaskState.prcoessing)); - if (!shouldRun) { + if (!_shouldRun) { return; } _log.fine("[call] Updating metadata for ${file.path}"); @@ -86,13 +86,13 @@ class UpdateMissingMetadata { } void stop() { - shouldRun = false; + _shouldRun = false; } - Future ensureWifi() async { + Future _ensureWifi() async { var count = 0; while (!await connectivity_util.isWifi()) { - if (!shouldRun) { + if (!_shouldRun) { throw const InterruptedException(); } // give a chance to reconnect with the WiFi network @@ -105,9 +105,9 @@ class UpdateMissingMetadata { } } - Future ensureBattery() async { + Future _ensureBattery() async { while (await Battery().batteryLevel <= 15) { - if (!shouldRun) { + if (!_shouldRun) { throw const InterruptedException(); } KiwiContainer().resolve().fire( @@ -118,7 +118,7 @@ class UpdateMissingMetadata { final FileRepo fileRepo; - bool shouldRun = true; + bool _shouldRun = true; static final _log = Logger("use_case.update_missing_metadata.UpdateMissingMetadata");