Use ifBlank

This commit is contained in:
sim 2022-09-20 01:42:03 +02:00
parent 17ba764518
commit d844cafa2c
1 changed files with 1 additions and 3 deletions

View File

@ -88,11 +88,9 @@ object DistributorUtils {
private fun getApp(context: Context, connectorToken: String): String? {
val db = getDb(context)
val app = db.getPackageName(connectorToken)
return if (app.isBlank()) {
return app.ifBlank {
Log.w(TAG, "No app found for this token")
null
} else {
app
}
}