diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/ChatMessageCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/ChatMessageCell.java index fa70f2ca0..a17717bac 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/ChatMessageCell.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Cells/ChatMessageCell.java @@ -1018,11 +1018,14 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate for (int a = 0; a < documentAttach.attributes.size(); a++) { TLRPC.DocumentAttribute attribute = documentAttach.attributes.get(a); if (attribute instanceof TLRPC.TL_documentAttributeAudio) { + /* this does not work and result in endless reloading of the messages in the + chatlist (you can check this using the `Log.i()`-command in ChatActivity if (attribute.waveform == null || attribute.waveform.length == 0) { MediaController.getInstance().generateWaveform(currentMessageObject); } useSeekBarWaweform = attribute.waveform != null; seekBarWaveform.setWaveform(attribute.waveform); + */ break; } } @@ -1919,9 +1922,10 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate durationLayout.draw(canvas); canvas.restore(); - if (currentMessageObject.type != MessageObject.MO_TYPE0_TEXT && currentMessageObject.messageOwner.to_id.channel_id == 0 && currentMessageObject.isContentUnread()) { - docBackPaint.setColor(currentMessageObject.isOutOwner() ? Theme.MSG_OUT_VOICE_SEEKBAR_FILL_COLOR : Theme.MSG_IN_VOICE_SEEKBAR_FILL_COLOR); - canvas.drawCircle(timeAudioX + timeWidthAudio + dp(6), dp(51) + namesOffset + mediaOffsetY, dp(3), docBackPaint); + if (!currentMessageObject.isOutOwner() && currentMessageObject.isUnread()) { + // mark unread incoming messages with a little dot (only works if we mark the voice messages as being read only if heard) + docBackPaint.setColor(Theme.MSG_IN_VOICE_SEEKBAR_FILL_COLOR); + canvas.drawCircle(timeAudioX + timeWidthAudio + dp(6), dp(51) + namesOffset + mediaOffsetY, dp(4), docBackPaint); } } diff --git a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java index 043507944..2d5d803fa 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java @@ -45,6 +45,7 @@ import android.provider.MediaStore; import android.text.TextUtils; import android.text.style.ClickableSpan; import android.text.style.URLSpan; +import android.util.Log; import android.util.TypedValue; import android.view.Gravity; import android.view.MotionEvent; @@ -193,6 +194,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not private final static int ID_CHAT_COMPOSE_PANEL = 1000; private TextView m_replyMenuItem, m_infoMenuItem, m_saveToXXMenuItem, m_openMenuItem, m_shareMenuItem; + private static final String TAG = "ChatActivity"; + public ChatActivity(Bundle args) { super(args); } @@ -2824,6 +2827,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not View view = holder.itemView; int msg_id = m_msglist[i]; + //Log.i(TAG, String.format("Loading message #%d to index #%d", msg_id, i)); boolean selected = false; boolean disableSelection = false; if (actionBar.isActionModeShowed()) {