mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 08:17:04 +05:30
fix: users can exist without inviters
This commit is contained in:
parent
4b9b148519
commit
51a8538d6a
3 changed files with 10 additions and 4 deletions
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Fix crash when viewing [jcs](https://lobste.rs/u/jcs)' comments
|
||||||
|
|
||||||
## [1.12.0] - 2022-12-09
|
## [1.12.0] - 2022-12-09
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -90,9 +90,11 @@ private fun UserProfileInternal(
|
||||||
ThemedRichText(
|
ThemedRichText(
|
||||||
text = user.about,
|
text = user.about,
|
||||||
)
|
)
|
||||||
|
user.invitedBy?.let { invitedBy ->
|
||||||
ThemedRichText(
|
ThemedRichText(
|
||||||
text = "Invited by [${user.invitedBy}](https://lobste.rs/u/${user.invitedBy})",
|
text = "Invited by [${invitedBy}](https://lobste.rs/u/${user.invitedBy})",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ import kotlinx.serialization.Serializable
|
||||||
class User(
|
class User(
|
||||||
val username: String,
|
val username: String,
|
||||||
val about: String,
|
val about: String,
|
||||||
@SerialName("invited_by_user") val invitedBy: String,
|
@SerialName("invited_by_user") val invitedBy: String?,
|
||||||
@SerialName("avatar_url") val avatarUrl: String,
|
@SerialName("avatar_url") val avatarUrl: String,
|
||||||
@SerialName("created_at") val createdAt: String,
|
@SerialName("created_at") val createdAt: String,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue