New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature : Show conversation history - part 1 - Show conversation history in chat screen #233
Conversation
…tion_history_part0 # Conflicts: # app/src/main/kotlin/com/wire/android/feature/conversation/di/ConversationsModule.kt # app/src/main/kotlin/com/wire/android/feature/conversation/list/ui/ConversationListFragment.kt
…tion_history_part1 # Conflicts: # app/src/main/kotlin/com/wire/android/feature/conversation/content/ui/ConversationActivity.kt # app/src/main/kotlin/com/wire/android/feature/conversation/content/ui/ConversationFragment.kt # app/src/main/kotlin/com/wire/android/feature/conversation/di/ConversationsModule.kt # app/src/main/kotlin/com/wire/android/feature/conversation/list/ui/ConversationListFragment.kt # app/src/main/res/layout/fragment_conversation.xml # app/src/main/res/values/styles_textview.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comment + I'm missing the tests for the viewModel and the use case
...n/com/wire/android/feature/conversation/content/datasources/local/MessageAndContactEntity.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/com/wire/android/feature/conversation/content/ui/ConversationViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/com/wire/android/feature/conversation/content/ui/ConversationActivity.kt
Outdated
Show resolved
Hide resolved
class ConversationTextMessageViewHolder(parent: ViewGroup, inflater: ViewHolderInflater) : | ||
RecyclerView.ViewHolder(inflater.inflate(R.layout.conversation_chat_item_text, parent)) { | ||
|
||
private val conversationChatItemUsernameTextView by lazyFind<TextView>(R.id.conversationChatItemUsernameTextView) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can get rid of those 3 lines and call directly conversationChatItemUsernameTextView
, conversationChatItemTextMessageTextView
and conversationChatItemUserAvatarImageView
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kotlin Synthetics is deprecated, I think we should use findViewById or migrate to Jetpack View Binding.
About migration:
https://developer.android.com/topic/libraries/view-binding/migration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do the migration later in different PRs ;)
…ance tests reports are stored (#234)
Yeah @mejdoo still work in progress, I am working on unit test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall 👍 I left a renaming proposal for MessageAndContactEntity
and also it would be nice to share a screenshot for RTL layouts.
...n/com/wire/android/feature/conversation/content/datasources/local/MessageAndContactEntity.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just something I found a bit odd...
Other thant that, looks good.
...est/kotlin/com/wire/android/feature/conversation/content/datasources/local/MessageDaoTest.kt
Outdated
Show resolved
Hide resolved
… into show_conversation_history_part1 # Conflicts: # app/src/androidTest/kotlin/com/wire/android/feature/conversation/content/datasources/local/MessageDaoTest.kt
What's new in this PR?
This PR is a follow up of #231.
It aims to display the conversation chat history.
Showing message's time, displaying the right profile picture and dark mode will be done in the following PRs