Add Unread Divider#60
Conversation
The only real content changes are: 1. The companion object 2. Formatting the two constructors to be multiline instead of one looong line Otherwise it's copy and paste of the DetailViewHolder and the imports that it needs.
|
Wow. This is from June and I haven't commented or merged. My apologies. I haven't worked on the Android app in a while. When I do, I'll certainly look at this and/or merge it. Looks very neat. Thank you for your contribution!! |
|
No problem! I’m running my fork, so I already have the unread divider and am happy :) |
|
I like the divider, though I don't understand the implementation and/or why it has to be so involved. Are there other things that you are doing in this that aren't strictly necessary? I didn't look too closely -- maybe I should re-read the PR .. |
|
The problem is that RecyclerViews/Adapters/ViewHolders are nice as long as you only have a single view type, but as soon as you have multiple view types, things get messy. An alternative would be to rewrite the screen in Jetpack Compose, where lists with mixed item types result in a lot cleaner/simpler/shorter code. But I didn't want to go there when I originally authored the PR. ExplanationTo explain the changes:
Going forwardThe radical option is to drop this PR entirely, and rewrite the screen in Jetpack Compose. If we want to keep the RecyclerView and this PR:
I agree that reviewing the change that moves |
This PR adds a divider after the unread messages. Just like in messaging apps.
The exact string ("You are all caught up!") is open for discussion. Maybe something more translation-friendly. E.g. Slack on iOS has "You're up-to-date 🎉" when you scroll up. Signal has "1 Unread Message".
Also, the string is hardcoded in XML right now because I don't know how your string/translation workflow works. I'll leave it to you to properly integrate it into the string setup.