Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
Fix: Make commit author field nullable
Browse files Browse the repository at this point in the history
Fixes #49
  • Loading branch information
wingio committed Dec 18, 2023
1 parent d6929c1 commit b5d7ec3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
Expand Down

0 comments on commit b5d7ec3

Please sign in to comment.