Skip to content

Commit

Permalink
Show draft indicator in conversation list
Browse files Browse the repository at this point in the history
Closes #1506
  • Loading branch information
moezbhatti committed Sep 29, 2019
1 parent 2e512fc commit e422537
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -93,9 +93,10 @@ class ConversationsAdapter @Inject constructor(
view.title.collapseEnabled = conversation.recipients.size > 1
view.title.text = conversation.getTitle()
view.date.text = dateFormatter.getConversationTimestamp(conversation.date)
view.snippet.text = when (conversation.me) {
true -> context.getString(R.string.main_sender_you, conversation.snippet)
false -> conversation.snippet
view.snippet.text = when {
conversation.draft.isNotEmpty() -> context.getString(R.string.main_draft, conversation.draft)
conversation.me -> context.getString(R.string.main_sender_you, conversation.snippet)
else -> conversation.snippet
}
view.pinned.isVisible = conversation.pinned
}
Expand Down
1 change: 1 addition & 0 deletions presentation/src/main/res/values/strings.xml
Expand Up @@ -53,6 +53,7 @@
<string name="main_menu_block">Block</string>
<string name="main_syncing">Syncing messages…</string>
<string name="main_sender_you">You: %s</string>
<string name="main_draft">Draft: %s</string>
<string name="main_message_results_title">Results in messages</string>
<string name="main_message_results">%d messages</string>
<string name="inbox_empty_text">Your conversations will appear here</string>
Expand Down

0 comments on commit e422537

Please sign in to comment.