diff --git a/app/src/main/java/dev/beefers/vendetta/manager/network/dto/Commit.kt b/app/src/main/java/dev/beefers/vendetta/manager/network/dto/Commit.kt index e9b26399..6d1e2380 100644 --- a/app/src/main/java/dev/beefers/vendetta/manager/network/dto/Commit.kt +++ b/app/src/main/java/dev/beefers/vendetta/manager/network/dto/Commit.kt @@ -9,7 +9,7 @@ data class Commit( val sha: String, @SerialName("commit") val info: Info, @SerialName("html_url") val url: String, - val author: User + val author: User? ) { @Serializable diff --git a/app/src/main/java/dev/beefers/vendetta/manager/ui/widgets/home/Commit.kt b/app/src/main/java/dev/beefers/vendetta/manager/ui/widgets/home/Commit.kt index e7cc1189..a01dc56f 100644 --- a/app/src/main/java/dev/beefers/vendetta/manager/ui/widgets/home/Commit.kt +++ b/app/src/main/java/dev/beefers/vendetta/manager/ui/widgets/home/Commit.kt @@ -48,15 +48,15 @@ fun Commit( verticalAlignment = Alignment.CenterVertically ) { AsyncImage( - model = commit.author.avatar, - contentDescription = commit.author.username, + model = commit.author?.avatar ?: "https://github.com/ghost.png", + contentDescription = commit.author?.username ?: "ghost", modifier = Modifier .size(20.dp) .clip(CircleShape) ) Text( - text = commit.author.username, + text = commit.author?.username ?: "ghost", style = MaterialTheme.typography.labelMedium ) }