Merge pull request #177 from geeksville/master

1.1.2 and fix CI build
pull/179/head
Kevin Hester 2020-09-27 14:20:59 -07:00 zatwierdzone przez GitHub
commit 705d1f2587
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -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 {

Wyświetl plik

@ -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("")