Improve messaging around story send failures.

This commit is contained in:
Cody Henthorne 2022-05-25 15:39:32 -04:00 committed by Alex Hart
parent 95a46f1ce5
commit 4d028d1867
2 changed files with 5 additions and 2 deletions

View file

@ -214,7 +214,8 @@ object StoriesLandingItem {
}
} else if (model.data.failureCount > 0 || (model.data.primaryStory.messageRecord.isOutgoing && model.data.primaryStory.messageRecord.isFailed)) {
errorIndicator.visible = true
date.text = SpanUtil.color(ContextCompat.getColor(context, R.color.signal_alert_primary), context.getString(R.string.StoriesLandingItem__send_failed))
val message = if (model.data.primaryStory.messageRecord.isIdentityMismatchFailure) R.string.StoriesLandingItem__partially_sent else R.string.StoriesLandingItem__send_failed
date.text = SpanUtil.color(ContextCompat.getColor(context, R.color.signal_alert_primary), context.getString(message))
} else {
errorIndicator.visible = false
date.text = DateUtils.getBriefRelativeTimeSpanString(context, Locale.getDefault(), model.data.dateInMilliseconds)

View file

@ -4536,8 +4536,10 @@
<string name="StoriesLandingItem__sending">Sending…</string>
<!-- Label when multiple stories are pending sending -->
<string name="StoriesLandingItem__sending_d">Sending %1$d…</string>
<!-- Label when a story fails to send -->
<!-- Label when a story fails to send due to networking -->
<string name="StoriesLandingItem__send_failed">Send failed</string>
<!-- Label when a story fails to send due to identity mismatch -->
<string name="StoriesLandingItem__partially_sent">Partially sent</string>
<!-- Status label when a story fails to send indicating user action to retry -->
<string name="StoriesLandingItem__tap_to_retry">Tap to retry</string>
<!-- Title of dialog confirming decision to hide a story -->