From 75f1a289daa4131aad939b4f4189c604f4afc2d3 Mon Sep 17 00:00:00 2001 From: Hasib Prince Date: Mon, 5 Sep 2022 06:07:10 +0000 Subject: Apply 1 suggestion(s) to 1 file(s) --- .../e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt b/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt index 9f39312..cba1548 100644 --- a/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt +++ b/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt @@ -139,8 +139,8 @@ class FakeLocationStateUseCase( override fun onLocationChanged(location: Location) { currentLocation.update { previous -> - if ((previous?.time?: 0) + 1800 < location.time || - (previous?.accuracy?: Float.MAX_VALUE) > location.accuracy) { + if ((previous?.time ?: 0) + 1800 < location.time || + (previous?.accuracy ?: Float.MAX_VALUE) > location.accuracy) { location } else { previous -- cgit v1.2.1