From f4fdfd7410b4a7909bc631af1729535da132aebf Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Mon, 16 Jan 2023 14:48:38 +1100 Subject: [PATCH 1/2] Added the updated delivery status UI --- .../v2/messages/VisibleMessageView.kt | 28 +++++++--- .../ic_delivery_status_failed.png | Bin 0 -> 291 bytes .../drawable-hdpi/ic_delivery_status_read.png | Bin 478 -> 275 bytes .../ic_delivery_status_sending.png | Bin 299 -> 293 bytes .../drawable-hdpi/ic_delivery_status_sent.png | Bin 415 -> 288 bytes .../ic_delivery_status_failed.png | Bin 0 -> 232 bytes .../drawable-mdpi/ic_delivery_status_read.png | Bin 313 -> 221 bytes .../ic_delivery_status_sending.png | Bin 193 -> 218 bytes .../drawable-mdpi/ic_delivery_status_sent.png | Bin 261 -> 234 bytes .../ic_delivery_status_failed.png | Bin 0 -> 315 bytes .../ic_delivery_status_read.png | Bin 679 -> 330 bytes .../ic_delivery_status_sending.png | Bin 298 -> 339 bytes .../ic_delivery_status_sent.png | Bin 524 -> 359 bytes .../ic_delivery_status_failed.png | Bin 0 -> 426 bytes .../ic_delivery_status_read.png | Bin 1023 -> 445 bytes .../ic_delivery_status_sending.png | Bin 556 -> 473 bytes .../ic_delivery_status_sent.png | Bin 863 -> 473 bytes .../ic_delivery_status_failed.png | Bin 0 -> 507 bytes .../ic_delivery_status_read.png | Bin 1473 -> 539 bytes .../ic_delivery_status_sending.png | Bin 588 -> 596 bytes .../ic_delivery_status_sent.png | Bin 1158 -> 567 bytes .../main/res/layout/view_visible_message.xml | 50 +++++++++--------- app/src/main/res/values/attrs.xml | 1 + app/src/main/res/values/strings.xml | 4 ++ app/src/main/res/values/themes.xml | 4 ++ 25 files changed, 55 insertions(+), 32 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_delivery_status_failed.png create mode 100644 app/src/main/res/drawable-mdpi/ic_delivery_status_failed.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_delivery_status_failed.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_delivery_status_failed.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_delivery_status_failed.png diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt index 0b4c1455fc..cd4bd4b6eb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt @@ -190,7 +190,14 @@ class VisibleMessageView : LinearLayout { binding.dateBreakTextView.text = if (showDateBreak) DateUtils.getDisplayFormattedTimeSpanString(context, Locale.getDefault(), message.timestamp) else null binding.dateBreakTextView.isVisible = showDateBreak // Message status indicator - val (iconID, iconColor) = getMessageStatusImage(message) + val (iconID, iconColor, textId) = getMessageStatusImage(message) + if (textId != null) { + binding.messageStatusTextView.setText(textId) + + if (iconColor != null) { + binding.messageStatusTextView.setTextColor(iconColor) + } + } if (iconID != null) { val drawable = ContextCompat.getDrawable(context, iconID)?.mutate() if (iconColor != null) { @@ -200,9 +207,12 @@ class VisibleMessageView : LinearLayout { } if (message.isOutgoing) { val lastMessageID = mmsSmsDb.getLastMessageID(message.threadId) + binding.messageStatusTextView.isVisible = + !message.isSent || message.id == lastMessageID binding.messageStatusImageView.isVisible = !message.isSent || message.id == lastMessageID } else { + binding.messageStatusTextView.isVisible = false binding.messageStatusImageView.isVisible = false } // Expiration timer @@ -256,13 +266,17 @@ class VisibleMessageView : LinearLayout { } } - private fun getMessageStatusImage(message: MessageRecord): Pair { + private fun getMessageStatusImage(message: MessageRecord): Triple { return when { - !message.isOutgoing -> null to null - message.isFailed -> R.drawable.ic_error to resources.getColor(R.color.destructive, context.theme) - message.isPending -> R.drawable.ic_circle_dot_dot_dot to null - message.isRead -> R.drawable.ic_filled_circle_check to null - else -> R.drawable.ic_circle_check to null + !message.isOutgoing -> Triple(null, null, null) + message.isFailed -> + Triple(R.drawable.ic_delivery_status_failed, resources.getColor(R.color.destructive, context.theme), R.string.delivery_status_failed) + message.isPending -> + Triple(R.drawable.ic_delivery_status_sending, context.getColorFromAttr(R.attr.message_status_color), R.string.delivery_status_sending) + message.isRead -> + Triple(R.drawable.ic_delivery_status_read, context.getColorFromAttr(R.attr.message_status_color), R.string.delivery_status_read) + else -> + Triple(R.drawable.ic_delivery_status_sent, context.getColorFromAttr(R.attr.message_status_color), R.string.delivery_status_sent) } } diff --git a/app/src/main/res/drawable-hdpi/ic_delivery_status_failed.png b/app/src/main/res/drawable-hdpi/ic_delivery_status_failed.png new file mode 100644 index 0000000000000000000000000000000000000000..c5de641a606bc05b7d867a551d825c8de5232174 GIT binary patch literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^{2``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eB{tizU$B+ufs}uL~G8yu;%G>kCy6q6W(a>{% zV>{!PkPVDUO$XSvgcvYM7f82Enw0)wp~lHr7FqvaPfm2cT`uwB`jm)23f?w5C#vq7 zB68JHSlC{oRK#myMBGI7nG+-}7cTHx?sZ3CdGKDdKN&ML<0f!to`@|LDo^P?6taHf z*7sj>u1tKZRhDI%BNnywmO|j%ofAZ57vHgz`fy3^rJeQ??OEHMk2!wwx>iviF@MQT jN51AWt&Wkr|HA!q-4tSyJ}SHi`hmgI)z4*}Q$iB}tNLo7 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_delivery_status_read.png b/app/src/main/res/drawable-hdpi/ic_delivery_status_read.png index 307190cae65210f401537e4021cd82cd3acdd163..bc55b7dfee830842e30666b229f7f95a0c8ad7b2 100644 GIT binary patch literal 275 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa&H|6fVg?3*IUvlacGk)SD9BhG z}&%?1K3>q7-NCkk**4d9#@ zz`mAQ=L(}x5c>lLnI(J)#+%Qmxc{h3N#7^=Ag}+d>k}`dCtGYd5|o%LXYY^J-eqBzND}-{n!$FiJ$jA-~3dqFWoig z#-^LbnPx$m`OxIR5%fhmAgsQ?V%dQ>;dN{$}xVwsn}>T0)6y`V)lfyhjL7;pT_I2B*dZFrV@P;+b=MLlcsT( zE94sf(dU}7JHZ5VjNex)>Y^j`^Paa% zYc6PHxA1N@SmW`E;(4V<7YI_OICA6s# z%reAFi8TIL?=1CME8!*D`3EDmWWW0*RGlHOw88?D>Fz>PtC9xFZC4+}cMFUgF>zVl zuG*RBHrYo8+Cn)dmTP?@wk1O6jt?c=E--#Vy_)3)Y)Qg9PMLfasU7T diff --git a/app/src/main/res/drawable-hdpi/ic_delivery_status_sending.png b/app/src/main/res/drawable-hdpi/ic_delivery_status_sending.png index fbdcef3583e349b398dd3d0de9bd8c6f0f48ab6a..1b8991d98b45be67d567e2a3d6923fc9c395585c 100644 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^{2``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eB{w_}!$B+ufvlI979&+GmmAB`O^*WW~;O22$ zDu+QjAh?zH1l!7$5{(9oITLygY(DqX`e>)p(i4;I=9cbzzBx5vCD&9>tI7JBBAx41 zB#iA&%svvwzVhB|R=;1}Umy4hoz^+Vv297lLiKAewy90GJb8jO@0&~U%zeKd-EUP* z_10C`Uw>ku=u*$c|76l*bZp+8Uy~ST&HW~+DxTyp$>*V4#lg3G myR460^_a+UmaXW_O8YGvRV2%|J?#Vfg2B_(&t;ucLK6VJj&B11 literal 299 zcmV+`0o4A9P)Px#DFc3^c^BwU6rO)u#zjzRT(Wev-^(cNv!8jwkVVfdtgNFvj zOr|^QZkp7&Y{VEn5L5>52(u21(Y4MSC7dNe4|+0s3r^_ZvtD9VbKAr~y!TJ}_lN4x zTIDj|F~1p`>8X;DK1WEEfpAZ5zO+6LI~U-%v_yKu8@NX=paS+w6N!gj=J?YU`DQXdD3!UpttNyGw%N~9Ch1yeR)vkB7C9A#{nJ(QTV%E22vhj}1+m=@_T{pdWtSfj=m7>#S3j3^P6Px$SxH1eR5%f>ltD@ZK@de}6v3TG2tuwAT+9VLf>}sBh6l(Ag5n8WDuRe}3BiTn z0R&O9aU$rMf5a0oG=+stHGtZ*T_`a%T1} z6!KWFSDRMXa59ltw^t2?yeD%Dc%O0uP9ibn2Sq|{4u83mHiUQ=e;LK_Q`X+CdvMI% z`NF5x-9?Dm)>!+moPo2r3cj65+8tx+{nploO)-iQc7u(Lsi&3=d+_*!*ttG!PGf3k zKf4aTa()7Bet#3xhBt!>l*8o|0J>k`L&)djv*C{YbR{vZ7|?r;my?0)Rbg2OPG?w zAbo(#N5Cwh<&1;pbRjD*FS|+HrbSx4$>%0WiC z3!e`xHFwoKzcZb?+N+91`*~yMZT2Aff=9NQqRM;jE_k$1+{B0doRd#fkh-9m*(o{s YLNAd;UJ)}HfevBtboFyt=akR{07qIzyZ`_I literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_delivery_status_read.png b/app/src/main/res/drawable-mdpi/ic_delivery_status_read.png index eee83ef591cb7bc8747070e9d74d8746e6cb44fa..072dac7b300219d6b232f9bcaf01e40e6addbbe1 100644 GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4aTa()7Bet#3xhBt!>l*8o|0J>k`9+>Cjv*C{Tl)if8w_|{q?;I26c{-@4sd!% za7}OsXlPMn6lrMoY{)K>KYgQa+M1Km*PeX6);VR3T*L<^_GvS&1abU4sU6IgFk@eE zUdW0)M|f@ClqNjedwFqMapOf{{(Xx|y*4cFev_f{QSo%6w9lkqd1EeFrI+zu+(6qI NJYD@<);T3K0RS7AM&keg literal 313 zcmV-90mlA`P)Px#^GQTOR45gFlf4SUFcgJTaCZ=gg3!K#4^?nDx1dlVt=DP_@OYQEp^@WD3rZEz=1GFPx)tM) zx5pK>MZ~JX$F7I4r2oLrA3Va>_=Ge37S;Mo(5!MrJ+2s5j#a%hyQxZ?VUK%7RJ7h~ z@AuycjM@_t$(i)em00000 LNkvXXu0mjf=;4Y~ diff --git a/app/src/main/res/drawable-mdpi/ic_delivery_status_sending.png b/app/src/main/res/drawable-mdpi/ic_delivery_status_sending.png index b34ea32b8b676f2ca13445fe985479af991f1453..f9b7fe3b79803d020f7d4b7438ea70f87c722f72 100644 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4aTa()7Bet#3xhBt!>l*8o|0J>k`T3qMjv*C{OZy#p8w_|{y_*_5SBS_cFv=LP zv#?t*h=efn9pDuDp<+Ab(%c^>t-s`+z28x%RvEanl7V*zLo@H1x=favJ0r#81%qeu z^e>O%k9aM%p_y;ag9Qpg7JW6>$|tQ9-}~ohDSwo)|I%Mcd0*EE7({%IH3M4B;OXk; Jvd$@?2>=QNLY)8r literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R})t)YnAsV7v zCpq#pDDbd!s^5R)C>;0HxT5v`T5HZLAvOmNs!88^J8crL=2e5up(mzTaj&Rc<}T;- zL@}l@gi-y?xz!JzwSVyQxv(JCCI67*?fIfoTP80wO)X*3_5WqLg>AmI_5JLN3ywb5 qjQ*>{`>1$3XWu;TXr-bT*>|=cD^RHs%!~#)gTd3)&t;ucLK6UcpGR5% diff --git a/app/src/main/res/drawable-mdpi/ic_delivery_status_sent.png b/app/src/main/res/drawable-mdpi/ic_delivery_status_sent.png index ff6bf0fac5c104028bd5e65c422c9a6cb5373e4f..26fceea79c193fcb29f8c7a21e5386418c4b5fac 100644 GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4aTa()7Bet#3xhBt!>l*8o|0J>k`SqSIjv*C{y%RR_HYfPx#zez+vR45gdlCcqjKoCVa$IJ@I7(1~5YS4tp)B;HC%E*W=um=jj_n18xFu|Mo zb9?{(-`ia%idf?~CeVNm3;|=gly%b%QGyqEgF4P~#&X`3S!`yBCpfG!agd8UHA%uJ z&GIAG41WXX&@>X(S#L9k_|9DqDm9?fV1w2xdCf-RSsZ3H!!ZkDZy`^_PUQhEDWwnl zvJlKA5&KFXs20`K%Usf`=`d}@PRhYdP5(DmpT)WV!{s_L?fNyo16n)HGv@hk00000 LNkvXXu0mjfm*i^Z diff --git a/app/src/main/res/drawable-xhdpi/ic_delivery_status_failed.png b/app/src/main/res/drawable-xhdpi/ic_delivery_status_failed.png new file mode 100644 index 0000000000000000000000000000000000000000..79aaa03f2be131a0b4d95b718f0e8d2c53526a81 GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^!XV7S1|*9D%+3HQ&H|6fVg?2=RS;(M3{v?36l5$8 za(7}_cTVOdki(Mh=oGT>yf)rzG2ETeIR~a5eDpJ?)nDXWKt$;K&=np@C#^&rCOhod&Z2w0OEjI=xnjr1 z8sUA_so$B63=%B2PFRz6sH%6x!-d`t_Pf{UWfn>76RElJ&*Opc8jq)KOGRX!xlCFT za?GV+wNBaGuFfllpEkSAJmmjpAK%0`Qcv}dFw4Jvt8qm7y{eJcnM#>GK)*3~y85}S Ib4q9e09V3xa{vGU literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_delivery_status_read.png b/app/src/main/res/drawable-xhdpi/ic_delivery_status_read.png index 79c4857f6c903cbc9fe5a353838516e7452eed7a..af79508abf145eefd645d8144207d8e172fca3d1 100644 GIT binary patch literal 330 zcmeAS@N?(olHy`uVBq!ia0vp^!XV7S1|*9D%+3HQ&H|6fVg?2=RS;(M3{v?36l5$8 za(7}_cTVOdki(Mh=7;{#hZF={|7S2;RxN3{!C1CH zHo(csKz0V-7G`e`&S?#@D(?Bae5MIejqrDVS0_Yt<>m|I>{s_fPJ=QLo1{(c!#k7ytd-G!@qWOT6Z-H`o&Oad*r8 zWjzOdSY`h>8!XSh9V`)_)XRDG#BM3mv@2>&dL9!px6foWJu&6M)w6Ri|1lBhtbf7E YS6{sOc5&fppjR0@UHx3vIVCg!0QYx(AOHXW literal 679 zcmV;Y0$BZtP)Px%VM#(i7i++-KnW8ek+bCPJan zLMnU$N-&Xv#6oE3pfg;rzi&7rdxx3XvnM%scIW%fIp5CA&dzOSDmIx+2Egn1OZ+Lm zjL+hi_zC{5X`0Wp!3um~7x)?e4gX5aZ(6^Rcp2ZuZ}5^G0W2vit%o1;D5rAk;kpgt z8h(Y>>=5vQveA0@xm>ETR#gOHh>vs8t-f=v7fpgqoq4EFMK+4kss%|0}yZ4!bstn0NsNR*atUnxNk zewrtYjO7@mpxqy+z-a+IN%~hTnU~)V_lObyRD!PCk#?;on8){9*h3TK<;PI381b*Q zhO)*y-vDgj`$qVaC0b{OFXaE4q1cG~Ep=86VrdFS3Ix|1v4=mldoRDw$dEo*n6lcU zZi@tDXM1S`p82;xCzB^x$_15q|&p zp#n0%p%FwZ*-wB+J@}MtMAf}&ed8mX?c(RVltCd$KC@zhjf`d}7Cq%B0PDV=$0 z$C5+vI8q)y^kB-V+;<1EmVopK(1OAgcKr={%U19u22mu(7wrBU^bds@7U$fAJk$UH N002ovPDHLkV1oGML)!oV diff --git a/app/src/main/res/drawable-xhdpi/ic_delivery_status_sending.png b/app/src/main/res/drawable-xhdpi/ic_delivery_status_sending.png index aca7fe7ef33f888bbf2f7e7fcbf22327de6d3f0e..74b8694dd4b155d7ccf7771669f007fc1228141e 100644 GIT binary patch literal 339 zcmeAS@N?(olHy`uVBq!ia0vp^!XV7S1|*9D%+3HQ&H|6fVg?2=RS;(M3{v?36l5$8 za(7}_cTVOdki(Mh=L*#EUlGr%XN&Fp;4 z^B*-CZ#%8yi+qg@H6^~AOt08rB7FW%M#ti0GpmgsGLP~fp1xIV&V$CJV?r+{WM$u9 zHsy{ouhhhI&qZPc-Hxrg)seSznZ&PSZkID09z}?XoIewHv1azwbEaK;r6gBRki7G+ h=;brn?DYTb=J5{BMw9NHegX6|gQu&X%Q~loCID5Gh8q9? literal 298 zcmV+_0oDGAP)Px#JyOLz0E*Nz81M! zWII(h`te3fMH%%S{Z9tCkh(t_3)CnTZ#ygt)GcpF07*qoM6N<$f?hIuDF6Tf diff --git a/app/src/main/res/drawable-xhdpi/ic_delivery_status_sent.png b/app/src/main/res/drawable-xhdpi/ic_delivery_status_sent.png index 811a54373df5e88873b4bfb6940fe575fdf45481..094d8b34cea107ab71ae47f31829f6566bf9eefa 100644 GIT binary patch literal 359 zcmV-t0hs=YP)8jrB1&Cigdx{YIZvop1IIiJA!arfO_r_TbF?$dy>;Xn$|zmjdzzASt2ygpgQlzE z=;nCtXbb}1-U{s+$ats20^i+@s9$N$42@E6&!VbRs_5&^2a)te^RUHm=RY`8m?&p; z{p9?Bkx0?J#S5w{$yktDAoXq5uxP(U>DrSSP5OKM4sR#mK^?n_Rc!zO002ovPDHLk FV1nE)lz0FD literal 524 zcmV+n0`vWeP)Px$#z{m$R7efAmc32_Q4ob)ZG8elXJTV~5<}>e@Ct;|p67tp%7S1a??Pc`d;sbE z34Y&oM=r`P5M+|W+?{*o%-#F96h}3-SS*@!x4{)S0}Y_PfG6+>9*UxP#&2&3H^2~l zfK4VxZWOOC1hEBPf%XROK^L5Z(-O9g*(XOcr&X&Cp$|TRHU>^ht;s35xRl#pn?R={ zS6tk#CDjDY$?{jXt=tNo%<#1V%=&agcZM}6EI;vySKMC1UiuKfceQvjR_CN+E$zbt@};c?iYTH z+}uH)rItZ#YJpj5vd@2!F7oHR4Zl)c9{rvZZRW!~H915f!t(&UgX@TeCsr#i4~_>? zo7WYP;6mN(BEGIb)fD*_S}KCyIPz>DD^pat$cW}eETj!WsLI1xS>#?yK_!B4C0EfHmtVDssUDxp{ z6gk`nCoAHc#B{mv|M$tvint~&eC&Oil_p2-@&gk>_#$inX_B<}-+aD=0Vv}yV$<%ys4slu`B z*sfK8H}j485UXJQv3^)5tO&8Lth=KED{_`3dsgEl&9MSnf}5lyw#KfyM5MBer5#703N=#f6LVOngtZm?I z@|yIm!Bj@CiFFLM%VJ&%Q$-%}iC%n6D>CO&dcaR1G8*e(+CUg4k0i4+60_d)9Fjb5 ztP6%YVceJgZewo(L2TlqBwmV==Pu+>;`Q%C3YnKD`$8DPb4Dq?Z5P%7A3n_C0Rs_* UvDa^jd;kCd07*qoM6N<$g8hcA?f?J) literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_delivery_status_read.png b/app/src/main/res/drawable-xxhdpi/ic_delivery_status_read.png index 474a570724f6c44106b228996ff16b49dc45e53b..69376c9a20c3502389f23c5bdfaa7774c81bfa96 100644 GIT binary patch literal 445 zcmeAS@N?(olHy`uVBq!ia0vp^G9b*s1|*Ak?@s|zoCO|{#S9FJ79h;%I?XTvD9BhG znu$bx9-wQYaqWtAL1zqjLJmqfnD zf`dPJ?jP0K9vH9xD=K7)8~@&pxe+ruZ>1&OJF)cE^G=?P&3*bU#)~%Z-Ecwb^0nn3 z{bw|${f)9pIi#m>ZK1$y=_4mHBE`3>&HDYZcW$(**#QNSUvmU>&zxn|{@H27@%@?9 l{!~Zvv*u2P@*m|tGH3L%2fxVbJ`D_Q22WQ%mvv4FO#mCMwx$38 literal 1023 zcmVPx&xk*GpR9FesS;1-)K@fF~U<41lc#D$ENxX>Q!ONa=(17j-7@8=!3pJLEkli+)JE_ebS;G3()SkQS0owQ zR-BeJuC_VJ6J>$ehi7L#&naS79AkPHwkG*27DL>%ta4kx z0FZ-Y%`b7YyCp_aw{!t}Bcy0Ea0IW-o-{b@>RMRLsKL2y=)Qnu;a7Q zz#JR}Q)zDER|+W!UM4ZVdbG)(8i#kPKLYn|^0Sg6zyjCoVa-j*Zr-2;Jz+0Ex1d_ibBuz{92||AvQg+b-9F@uMG2O~ z5ghMA`9>=e9WMbjI5M2NQApgho$yNUYpQ{EIcto@_&k(Xm2z1S(aymk))T0EPWe0q zelxd4_F3pSB9aLTMMB8&-gAr>}5VI0b59t{mAQvDE~G3OSiA z+AeT_Q9zj^S5{e2>QRV^3r)%s%fcZhvIEi8okKxPl^92|sqBB!q{o}BeX^F7MxDRNevE?8AxG(E9l2J#(6EC(l}1Q$B{ zX~2`Sd>|zvAI|!CWyNvT8UKVo=6GT`pUobrSP_GT7vO z+`Rmxh>%4vce&Ip{3T*4FP=smgv|(R3GaR(0&RT&8$o$O;gKaqxGc+mQV2f!QgN7z tIhniq@DAj%}xLS002ovPDHLkV1lw2-7o+E diff --git a/app/src/main/res/drawable-xxhdpi/ic_delivery_status_sending.png b/app/src/main/res/drawable-xxhdpi/ic_delivery_status_sending.png index 4a81c629d8f6b146b79e7e85a2665dc80dc6c183..3dce4a05ea972d6d59ce32b35cfed0ce4b759655 100644 GIT binary patch literal 473 zcmV;~0Ve*5P)}+F#Z zF&P^*FW8BXHw2KB_G(U2(A{_d9NDxFOgc^G^${Yai%=oJW*phptX5o;#DiaCt}_@ksmu$4Z4`T!p#O P00000NkvXXu0mjfQvPx$=1D|BR9Fe^n7vNJFcgJrikP|}#8O_VBO8@?4A!u8=+JjyVC%@l3-AI=?66dV z6(OPU9qQ|}A%9KO$Vk1?t$)usw~p=D84NmFnx+YEmUN^W95o?8?F7GQ(zmFOu;M6c z%h%Ng1knW0GrlD6@&t8dk6DVtbJao0+aVa^pSanyymxU6z^Q>r#WgPOxvs4oA?Ms1 z-4>qUgLLTgyClL0D_eNZb*arS|7e8I@v}B~VTAP@qqZDz;P@An&vzeDmTJ;4!8Pe- z_}+(B8eU79TFIGFp?&5BH=Adz`^h1sd1)r?Y@ec_jqAy`zLU0|z)i!K1}-g`w0}3= zu+dSW{1rZAY2Gy@?$QsZZN-ooqZH2(*1{sFcnE5KPO4vxPBXyM@tc3Acaco}*jbtO$@uSi>vpqocNT>5QR~2Ef uOYkf5UzK7s)&?X3PxM+xR@M%_G4=;D`ptU>DcctS0000cR6OavXH(-OX0oMuW2CzZcAlC_6yOFUI5<3F^aL0G|E{7va zvSq~pFP@z@fo)->t(I04ji0Q(tiJIe$m(GAn^D6F-Nn0A8##4>E348<@pH$)yiJX6 zH^girCwug_af~WT?kEkaqF_caj}TT{3+7!W8OR}om8v-tG{Pa6%NkuhJqDrXS^SCA zn1>#5?&>#dl?6iW2zi`+Ghx5u@hTo%42)L%JhO7FInd{b{fVE;lmmtFy(e^aDF$Py zTI(@iiwR>I{B{Ro!}54XA4v0)dP$sBI~b2^{E=bW!xKVNt@5Pq0J= zgXtbp2&Y&ld?*NdnULVt9*wqc&lO P00000NkvXXu0mjfwiv}& literal 863 zcmV-l1EBngP)Px&8A(JzR9Fekn7?ilK@i4mLO~HEyP-e|IvPI#U79OMQqZ`h$Yap)25FK9Arcf6 z2w5(oJOW7RObS{gB0&)a^ZPC{WU_Z>?#@o+k-p6C?ELw1d%L&mey^p>=kp;UufPs? z2A&#Fz3+x|^k?v~-|zoGuU;TB1`}`znu>fCGhP`Zl5K-iu&gM@c4uM)Z-Ao;7FXC# zz#EW*5!f`SEt|&VBi~dGF>JIVM!*1kN;3VXe*m5|O(tK9QEU|D9yH1$NAM*^(|!lG z8YQT3QY<(IQB-3wDI7FS@yYz5|F)t=CzEmk<#bW4`srgZzB3AZ-Kp||Ams#+)M2GN zPFhV-R`z7lf)vq{ic(&EjK-yXoF-YePyUB72mSa?oyM^qgJa;L718+xzLnTITZ{qo=pA*Kc0#WE$T_PsYPk6Sz!8NN>N($Q@lXkb$q@rQ7N>KCQ?o z4>2R)awfxt_t2ZM7=4kM+4wKC4rP_XSZgv$M4V0vE*EVGDM-t=L<(CcGDhgJ5}W)K zp(a!2Pf2ki^=~22-ZLAj5cy^*)$yUIO+G3{(rk9ztf-e{sNMWB|QZda&-Uz002ovPDHLkV1lXgi#GrO diff --git a/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_failed.png b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_failed.png new file mode 100644 index 0000000000000000000000000000000000000000..6780212b8be58b04cdd25e60553f32de56cf8bd8 GIT binary patch literal 507 zcmV@~0drDELIAGL9O(c600d`2O+f$vv5yPVK~#7F?U&JQ zgD?<=|F#S8*vA_oBY1>tP>+xe@CNAy=>{1Ab%KnLZje0otu+Fo-)=DuVAD!`(n-iZ z=gw!}9{~O!Pne&=+H?E-iG`_?*<1S}J6IDe$N_Fbot>}{nv%F!tE`=A%wPdHfo(e` za1$+%krM75VhqjgkqJRlg)Xpo^MyCBkO98jrpISTJ{1xp6zmMQO5*vRkf~Z6NYi+y zRa_MXcLPZ-z4n4Ie216{i6w$1Kn3O)K|+Zr(Juj^q-xB-+EEC?5-^lh5{ZbBfG(*^ z&-|D`~(vu zqC|o=ZZTtiTj0J$O2it~2G9|{qa-3m0{kGniJ_yexl1B8xW7aEoeSdV`*Z)nG1k#T z&{S2$FL5LySS`+8ke=JIKL(tx^!$Rfu&Q4l0*(fa9Ne7YCORiV&u<~e`qJ_d=CHb< xBvh#mjpq0Yr2BUJu=Z~473of6Wo6}m@(rh<;9~An;5PsO002ovPDHLkV1gPG)WiS) literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_read.png b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_read.png index c138886aa3cda1f0ebc80c338e42156c168c86e0..d0b16705c03b6da077d27d5123fce8e2404c91a8 100644 GIT binary patch literal 539 zcmV+$0_6RPP)@~0drDELIAGL9O(c600d`2O+f$vv5yPGB;{e-v zwiQ_ku(7eR@yi{;Nmz#O-&p?+naF$9y}lfxcNs2bSHtwGCXBdLVI^}|$h-t{`fB>=;3|XaEfWc23tYwPEPTV}pWsJ63@KuWi zwbT$3*;tE6zidn-V^TT^f|k1sFjQbg4CV_rtBxmP;6ccL3AA!4YllnV(g903i;j;o dJPzEO<{QK~)TFvn4j2Fc002ovPDHLkV1oGV;dTH3 literal 1473 zcmV;y1wQ(TP)Px)dr3q=RA>d&o6CzGMHGkU8boHmXf}$8h~R)h5L`$CBEb=&xEZpa#l=N%<3?~d zN?LrN3(3ZXe?=yskcA6f2zelgD58un5R!$X@qxzC;Q0MIU484G>35wT@xY-TUG<&E zboK47?wKq&$j;8rBADao3VIk_Mh~F3qSw(MBK?&52k3{B$>cZ6R%zjDzBpIWuh1{h z_tE#@U!(kQ1g8(6Q*;CU9qlWc^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pNqYH*aOS7_7v?M06NPV~uel_sHPlOBg>v;K8z7eRP@Nc9)26>HRy zKQuv#ZCG+bFaW$hvb+jw*BcH;KB!)j{t;)Cq(hkY_;vdR&K-dpO8UI`T{EOud_Dt? zg7Es#dlTpG58P1F=f!VI(l{TIhagm9eFg=@jm-i=a1DlTHz#_->3P`_Hx)AGas+{`Y b|2x#bQw83>|Io`_00000NkvXXu0mjfzW(y0 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_sending.png b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_sending.png index 461c2ea6361a83ea088626809fdd9c142c45a154..411dc9d502715780984077036bf307170b884d78 100644 GIT binary patch literal 596 zcmV-a0;~OrP)@~0drDELIAGL9O(c600d`2O+f$vv5yP)p0 z`zSllTGFzYT1TzV=3F$--lOhP``L%)I2wVvwY>FvM}V$!2lTTxN9KS|0l~O@yfGgY zMvk+BIU~n2q;r7TxFlc7aw0Gu-pDNy;N2#W2g**B>Q})W)H&HO-@BNCJk0`m;n}KU z3h}{x4GydhNru~j0(>5MweGD^cc-%K%43&}odz|3+m4?4yeM?7STXw+=0v!1JWtwq z?1dGq@%&JxIA_Zd=dn31Eqi-yXF#&^lAYhh2E{pB*JX43@YqX_oe=E&3jxr!#O{jL zQM+6e=p46;wQVPM=w6t4KpkEL+~Xi8J6LaD2q$#&$e8tR$p0nA{|1rijX)x?Cj`u` zM$T;UEG-ZT@Ap0Ou!gzwh-L<}RfGHN0hTZ)Q-MUJ~9jwy9V!(e=s^OqLAU2=u>BLPY_N{)+hxiEdd52}XuE&Gj!~)>KFtxMOx& iVCi4N3;K)r|Kb}?2IlmRZ(y4M0000Px%21!IgRA>e5nn7;DFc3wXvZ&ZpVu@5v2OBPc#D+-a1RS$ccU9Nz`^8q>m;k{J ziK`iDh_NSsz9-2zwo^UyBwt7fT_NHBT;<1HKtthl?f`*Zpa=9R7inQR%$Ho45e^Qf z=nnlvCELg-s5qMZ{sv7^QCQAW*zz%rj8ZEA-8(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;~EmD(97Vhz(zgk&rVJ{a$Vc!c zpI#JuwSwDLONQQCIDf_QdL^ehM)C>dJ0|6lz=NiZzw-a+(^W6DZgRM04#{_jp;%VL zrPy>raTfSF|ChcenUQNAP%NOBR>Vm+f^0!Sx5|&!ingxC<7}&DMu@2-{4XJH*|%5* zbr1Hk*$l>t!u!iI$$Qe(GpZH8$s?L``kZkx34A?Y zy0&r72cC*NNTv8 z6OqUHJK(3yCR3$5Ah74Qqy+R1Yen^ZBQhj;aq`^eHHG%v&$5`u9^Gf)Zk|qT44c^9 zMxnbg{a7Emi!v~>rv&y*hnjOSWA!oC4Y~&$^WM%E2xoP0#&Av@exk~g<8pn z1fo-@>>~D4Ny(&si6+R01Qr#{NN*AEnhrIeN;yx^$x1?3z4j}ga1l3PWmjup%l6QI znHc09(TgRa(x7m8kmo-(CT_sWmJ+C3N?;pH!Uj;g8zWPt4`1g>2_-O8F(-l`OX?&a zFXnV5h^}2?D;s655QecNY9k*wY6sBD&M8NFJ9dP2=@%MoY!Y>o*8?p2Leoov!5QEe zU+GuMkVLKIMG(LFuarS)q%Za25EIA`eyNusikEv^B_wfqH?~3oWP#7Ig0)?!Fv z78Acir;XMN+aFadP=0e)2}m$r07t;e<=9^Dr_f7c)v`Bj?N!#k - - - + + - - - - + app:layout_constraintTop_toBottomOf="@+id/emojiReactionsView" + tools:tint="@color/classic_dark_1" + android:src="@drawable/ic_delivery_status_sent" /> diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 888b0af633..f0d04162bc 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -164,6 +164,7 @@ + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8bde853c73..805ec6fb2a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -864,4 +864,8 @@ Join Navigate Back Close Dialog + Sending + Read + Sent + Failed to send diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 4c7dfd1db4..7dccb3a797 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -370,6 +370,7 @@ @color/classic_dark_6 ?colorAccent @color/classic_dark_0 + @color/classic_dark_5 @color/classic_dark_1 @color/classic_dark_5 @color/classic_dark_6 @@ -454,6 +455,7 @@ @color/classic_light_0 ?colorAccent @color/classic_light_0 + @color/classic_light_1 @color/classic_light_6 @color/classic_light_1 @color/classic_light_0 @@ -535,6 +537,7 @@ @color/ocean_dark_6 ?colorAccent @color/ocean_dark_0 + @color/ocean_dark_5 @color/ocean_dark_1 @color/ocean_dark_5 @color/ocean_dark_6 @@ -618,6 +621,7 @@ @color/ocean_light_0 ?colorAccent @color/ocean_light_0 + @color/ocean_light_2 @color/ocean_light_6 @color/ocean_light_1 @color/ocean_light_0 From a6f09c6fefb5dc654b15d994288fdeac30f710c5 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Mon, 23 Jan 2023 12:42:10 +1100 Subject: [PATCH 2/2] Added some defensive coding to help prevent incorrect message statuses --- .../v2/messages/VisibleMessageView.kt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt index cd4bd4b6eb..46864fc930 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt @@ -207,10 +207,18 @@ class VisibleMessageView : LinearLayout { } if (message.isOutgoing) { val lastMessageID = mmsSmsDb.getLastMessageID(message.threadId) - binding.messageStatusTextView.isVisible = - !message.isSent || message.id == lastMessageID - binding.messageStatusImageView.isVisible = - !message.isSent || message.id == lastMessageID + binding.messageStatusTextView.isVisible = ( + textId != null && ( + !message.isSent || + message.id == lastMessageID + ) + ) + binding.messageStatusImageView.isVisible = ( + iconID != null && ( + !message.isSent || + message.id == lastMessageID + ) + ) } else { binding.messageStatusTextView.isVisible = false binding.messageStatusImageView.isVisible = false