Message state: add sent status in BottomSheet

This commit is contained in:
ganfra 2021-03-11 19:34:34 +01:00
parent a407ed1903
commit 992cc0addd
2 changed files with 15 additions and 4 deletions

View file

@ -73,12 +73,19 @@ class MessageActionsEpoxyController @Inject constructor(
text(stringProvider.getString(R.string.unable_to_send_message)) text(stringProvider.getString(R.string.unable_to_send_message))
drawableStart(R.drawable.ic_warning_badge) drawableStart(R.drawable.ic_warning_badge)
} }
} else if (sendState != SendState.SYNCED) { } else if (sendState?.isSending().orFalse()) {
bottomSheetSendStateItem { bottomSheetSendStateItem {
id("send_state") id("send_state")
showProgress(true) showProgress(true)
text(stringProvider.getString(R.string.event_status_sending_message)) text(stringProvider.getString(R.string.event_status_sending_message))
} }
} else if (sendState == SendState.SENT) {
bottomSheetSendStateItem {
id("send_state")
showProgress(false)
drawableStart(R.drawable.ic_message_sent)
text(stringProvider.getString(R.string.event_status_sent_message))
}
} }
when (state.informationData.e2eDecoration) { when (state.informationData.e2eDecoration) {
@ -124,9 +131,11 @@ class MessageActionsEpoxyController @Inject constructor(
} }
} }
// Separator if (state.actions.isNotEmpty()) {
dividerItem { // Separator
id("actions_separator") dividerItem {
id("actions_separator")
}
} }
// Action // Action

View file

@ -208,6 +208,8 @@
<string name="initial_sync_start_importing_account_groups">Initial Sync:\nImporting Communities</string> <string name="initial_sync_start_importing_account_groups">Initial Sync:\nImporting Communities</string>
<string name="initial_sync_start_importing_account_data">Initial Sync:\nImporting Account Data</string> <string name="initial_sync_start_importing_account_data">Initial Sync:\nImporting Account Data</string>
<string name="event_status_sent_message">Message sent</string>
<string name="event_status_sending_message">Sending message…</string> <string name="event_status_sending_message">Sending message…</string>
<string name="clear_timeline_send_queue">Clear sending queue</string> <string name="clear_timeline_send_queue">Clear sending queue</string>