@@ -201,18 +201,18 @@ public void setStoragePermissionListener(KmStoragePermissionListener storagePerm
201
201
}
202
202
203
203
public DetailedConversationAdapter (final Context context , int textViewResourceId , List <Message > messageList , Channel channel , Class messageIntentClass , EmojiconHandler emojiconHandler ) {
204
- this (context , textViewResourceId , messageList , null , channel , messageIntentClass , emojiconHandler );
204
+ this (context , textViewResourceId , messageList , null , channel , messageIntentClass , emojiconHandler , null );
205
205
}
206
206
207
207
public DetailedConversationAdapter (final Context context , int textViewResourceId , List <Message > messageList , Contact contact , Class messageIntentClass , EmojiconHandler emojiconHandler ) {
208
- this (context , textViewResourceId , messageList , contact , null , messageIntentClass , emojiconHandler );
208
+ this (context , textViewResourceId , messageList , contact , null , messageIntentClass , emojiconHandler , null );
209
209
}
210
210
211
211
public void setLastSentMessage (Message message ) {
212
212
this .lastSentMessage = message ;
213
213
}
214
214
215
- public DetailedConversationAdapter (final Context context , int textViewResourceId , List <Message > messageList , final Contact contact , Channel channel , Class messageIntentClass , EmojiconHandler emojiconHandler ) {
215
+ public DetailedConversationAdapter (final Context context , int textViewResourceId , List <Message > messageList , final Contact contact , Channel channel , Class messageIntentClass , EmojiconHandler emojiconHandler , AlCustomizationSettings alCustomizationSettings ) {
216
216
//super(context, textViewResourceId, messageList);
217
217
this .messageIntentClass = messageIntentClass ;
218
218
this .context = context ;
@@ -226,6 +226,7 @@ public DetailedConversationAdapter(final Context context, int textViewResourceId
226
226
this .contactService = new AppContactService (context );
227
227
this .imageCache = ImageCache .getInstance (((FragmentActivity ) context ).getSupportFragmentManager (), 0.1f );
228
228
this .messageList = messageList ;
229
+ this .alCustomizationSettings = alCustomizationSettings ;
229
230
geoApiKey = Applozic .getInstance (context ).getGeoApiKey ();
230
231
contactImageLoader = new ImageLoader (context , ImageUtils .getLargestScreenDimension ((Activity ) context )) {
231
232
@ Override
@@ -254,7 +255,7 @@ protected Bitmap processBitmap(Object data) {
254
255
imageThumbnailLoader .setImageFadeIn (false );
255
256
imageThumbnailLoader .addImageCache (((FragmentActivity ) context ).getSupportFragmentManager (), 0.1f );
256
257
257
- if (useInnerTimeStampDesign ) {
258
+ if (useInnerTimeStampDesign || ( alCustomizationSettings != null && ! TextUtils . isEmpty ( alCustomizationSettings . getMessageStatusIconColor ())) ) {
258
259
sentIcon = context .getResources ().getDrawable (R .drawable .km_sent_icon_c );
259
260
deliveredIcon = context .getResources ().getDrawable (R .drawable .km_delivered_icon_c );
260
261
readIcon = context .getResources ().getDrawable (R .drawable .km_read_icon_c );
@@ -1729,14 +1730,21 @@ public MyViewHolder(final View customView) {
1729
1730
messageRootLayout = (RelativeLayout ) customView .findViewById (R .id .messageLayout );
1730
1731
emailLayout = customView .findViewById (R .id .emailLayout );
1731
1732
viaEmailView = customView .findViewById (R .id .via_email_text_view );
1733
+ statusIconBackground = customView .findViewById (R .id .statusIconBackground );
1732
1734
1733
1735
if (useInnerTimeStampDesign ) {
1734
- statusIconBackground = customView .findViewById (R .id .statusIconBackground );
1735
- if (statusIconBackground != null ) {
1736
- KmUtils .setGradientSolidColor (statusIconBackground , themeHelper .getMessageStatusIconColor ());
1737
- }
1736
+ if (statusIconBackground != null ) {
1737
+ KmUtils .setGradientSolidColor (statusIconBackground , themeHelper .getMessageStatusIconColor ());
1738
+ }
1738
1739
}
1739
1740
else {
1741
+ if (statusIconBackground != null ){
1742
+ if (!TextUtils .isEmpty (alCustomizationSettings .getMessageStatusIconColor ())) {
1743
+ KmUtils .setGradientSolidColor (statusIconBackground , themeHelper .getMessageStatusIconColor ());
1744
+ } else {
1745
+ statusIconBackground .setVisibility (GONE );
1746
+ }
1747
+ }
1740
1748
timestampLayout = customView .findViewById (R .id .timestampLayout );
1741
1749
statusImageView = customView .findViewById (R .id .statusImageView );
1742
1750
}
0 commit comments