mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-19 14:01:01 +02:00
Caching channel info JSON parse in NoteCompose.
This commit is contained in:
@@ -246,30 +246,32 @@ fun ChatroomMessageCompose(
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
val event = note.event
|
||||
if (event is ChannelCreateEvent) {
|
||||
val channelInfo = event.channelInfo()
|
||||
Text(
|
||||
text = note.author?.toBestDisplayName()
|
||||
.toString() + " ${stringResource(R.string.created)} " + (
|
||||
event.channelInfo().name
|
||||
channelInfo.name
|
||||
?: ""
|
||||
) + " ${stringResource(R.string.with_description_of)} '" + (
|
||||
event.channelInfo().about
|
||||
channelInfo.about
|
||||
?: ""
|
||||
) + "', ${stringResource(R.string.and_picture)} '" + (
|
||||
event.channelInfo().picture
|
||||
channelInfo.picture
|
||||
?: ""
|
||||
) + "'"
|
||||
)
|
||||
} else if (event is ChannelMetadataEvent) {
|
||||
val channelInfo = event.channelInfo()
|
||||
Text(
|
||||
text = note.author?.toBestDisplayName()
|
||||
.toString() + " ${stringResource(R.string.changed_chat_name_to)} '" + (
|
||||
event.channelInfo().name
|
||||
channelInfo.name
|
||||
?: ""
|
||||
) + "$', {stringResource(R.string.description_to)} '" + (
|
||||
event.channelInfo().about
|
||||
channelInfo.about
|
||||
?: ""
|
||||
) + "', ${stringResource(R.string.and_picture_to)} '" + (
|
||||
event.channelInfo().picture
|
||||
channelInfo.picture
|
||||
?: ""
|
||||
) + "'"
|
||||
)
|
||||
|
Reference in New Issue
Block a user