Skip to content
Snippets Groups Projects
Unverified Commit 438bb43d authored by TheBusyBiscuit's avatar TheBusyBiscuit Committed by GitHub
Browse files

Changed ifelse structure into a simple return statement (sonarcloud:...

Changed ifelse structure into a simple return statement (sonarcloud: `kotlin:S1125`) (COMMUNITY) (#3427)

* Bump to next Version 1.11.0.8 (DEV) #2220

* Changed ifelse structure into a simple return statement

See `kotlin:S1125` on sonarcloud

Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
Co-authored-by: default avatarCWA Technical User <67319337+Corona-Warn-App-Technical-User@users.noreply.github.com>
Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
parent 0ca76040
No related branches found
No related tags found
No related merge requests found
...@@ -121,7 +121,7 @@ class CoronaTestRepository @Inject constructor( ...@@ -121,7 +121,7 @@ class CoronaTestRepository @Inject constructor(
val toRefresh = internalData.data val toRefresh = internalData.data
.first().values .first().values
.filter { if (type == null) true else it.type == type } .filter { type == null || it.type == type }
.map { it.identifier } .map { it.identifier }
Timber.tag(TAG).d("Will refresh %s", toRefresh) Timber.tag(TAG).d("Will refresh %s", toRefresh)
...@@ -134,7 +134,7 @@ class CoronaTestRepository @Inject constructor( ...@@ -134,7 +134,7 @@ class CoronaTestRepository @Inject constructor(
val refreshedData = internalData.updateBlocking { val refreshedData = internalData.updateBlocking {
val polling = values val polling = values
.filter { if (type == null) true else it.type == type } .filter { type == null || it.type == type }
.filter { toRefresh.contains(it.identifier) } .filter { toRefresh.contains(it.identifier) }
.map { coronaTest -> .map { coronaTest ->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment