Merge pull request #177 from geeksville/master

1.1.2 and fix CI build
This commit is contained in:
Kevin Hester
2020-09-27 14:20:59 -07:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -30,8 +30,8 @@ android {
applicationId "com.geeksville.mesh"
minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works)
targetSdkVersion 29
versionCode 20100 // format is Mmmss (where M is 1+the numeric major number
versionName "1.1.00"
versionCode 20102 // format is Mmmss (where M is 1+the numeric major number
versionName "1.1.02"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {

View File

@@ -35,7 +35,10 @@ fun getInitials(nameIn: String): String {
val initials = when (words.size) {
in 0..minchars - 1 -> {
val nm = name.first() + name.drop(1).filterNot { c -> c.toLowerCase() in "aeiou" }
val nm = if (name.length >= 1)
name.first() + name.drop(1).filterNot { c -> c.toLowerCase() in "aeiou" }
else
""
if (nm.length >= nchars) nm else name
}
else -> words.map { it.first() }.joinToString("")