fix: null author in commits (#16)
This commit is contained in:
parent
9efa79f6cb
commit
749587cf12
3 changed files with 3 additions and 7 deletions
|
|
@ -14,7 +14,7 @@ data class Commit(
|
||||||
val htmlUrl: String,
|
val htmlUrl: String,
|
||||||
val sha: String,
|
val sha: String,
|
||||||
val commit: Commit,
|
val commit: Commit,
|
||||||
val author: Author
|
val author: Author?
|
||||||
) {
|
) {
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Author(@SerialName("login") val name: String)
|
data class Author(@SerialName("login") val name: String)
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ fun HomeScreen(
|
||||||
ListItem(
|
ListItem(
|
||||||
modifier = Modifier.clickable { uriHandler.openUri(commitData.htmlUrl) },
|
modifier = Modifier.clickable { uriHandler.openUri(commitData.htmlUrl) },
|
||||||
overlineText = { Text(commitData.sha.substring(0, 7)) },
|
overlineText = { Text(commitData.sha.substring(0, 7)) },
|
||||||
headlineText = { Text("${commitData.commit.message.split("\n").first()} - ${commitData.author.name}") }
|
headlineText = { Text("${commitData.commit.message.split("\n").first()} - ${commitData.author?.name ?: "UNKNOWN"}") }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
|
@ -6,11 +5,8 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("com.android.tools.build:gradle:7.4.0-alpha10")
|
classpath("com.android.tools.build:gradle:7.3.0")
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
|
||||||
// in the individual module build.gradle.kts files
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue