Use ifBlank
This commit is contained in:
parent
17ba764518
commit
d844cafa2c
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue