Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-18.0] Bug Fix - IllegalStateException in stopAudioRecording + Polishes #3475

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public void onBind(@NonNull ChatMessage message) {
) {
Spanned processedMessageText = null;
binding.incomingPreviewMessageBubble.setBackgroundResource(R.drawable.shape_grouped_incoming_message);
binding.incomingPreviewMessageBubble.setOnClickListener(null);
if (viewThemeUtils != null ) {
processedMessageText = messageUtils.enrichChatMessageText(
binding.messageCaption.getContext(),
Expand All @@ -76,8 +75,9 @@ public void onBind(@NonNull ChatMessage message) {
viewThemeUtils,
processedMessageText,
message,
itemView);
binding.incomingPreviewMessageBubble);
}
binding.incomingPreviewMessageBubble.setOnClickListener(null);

float textSize = 0;
if (context != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ class IncomingVoiceMessageViewHolder(incomingView: View, payload: Any) :
this.message = message
sharedApplication!!.componentApplication.inject(this)

val filename = message.selectedIndividualHashMap!!["name"]
val retrieved = appPreferences!!.getWaveFormFromFile(filename)
if (retrieved.isNotEmpty() &&
message.voiceMessageFloatArray == null ||
message.voiceMessageFloatArray?.isEmpty() == true
) {
message.voiceMessageFloatArray = retrieved.toFloatArray()
binding.seekbar.setWaveData(message.voiceMessageFloatArray!!)
}
binding.messageTime.text = dateUtils.getLocalTimeStringFromTimestamp(message.timestamp)

setAvatarAndAuthorOnMessageItem(message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
package com.nextcloud.talk.adapters.messages;

import android.text.Spanned;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
import android.widget.ImageView;
Expand Down Expand Up @@ -60,7 +59,6 @@ public void onBind(@NonNull ChatMessage message) {
) {
Spanned processedMessageText = null;
binding.outgoingPreviewMessageBubble.setBackgroundResource(R.drawable.shape_grouped_outcoming_message);
binding.outgoingPreviewMessageBubble.setOnClickListener(null);
if (viewThemeUtils != null) {
processedMessageText = messageUtils.enrichChatMessageText(
binding.messageCaption.getContext(),
Expand All @@ -76,8 +74,9 @@ public void onBind(@NonNull ChatMessage message) {
viewThemeUtils,
processedMessageText,
message,
itemView);
binding.outgoingPreviewMessageBubble);
}
binding.outgoingPreviewMessageBubble.setOnClickListener(null);

float textSize = 0;
if (context != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ class OutcomingVoiceMessageViewHolder(outcomingView: View) :
this.message = message
sharedApplication!!.componentApplication.inject(this)
viewThemeUtils.platform.colorTextView(binding.messageTime, ColorRole.ON_SURFACE_VARIANT)

val filename = message.selectedIndividualHashMap!!["name"]
val retrieved = appPreferences!!.getWaveFormFromFile(filename)
if (retrieved.isNotEmpty() &&
message.voiceMessageFloatArray == null ||
message.voiceMessageFloatArray?.isEmpty() == true
) {
message.voiceMessageFloatArray = retrieved.toFloatArray()
binding.seekbar.setWaveData(message.voiceMessageFloatArray!!)
}

binding.messageTime.text = dateUtils.getLocalTimeStringFromTimestamp(message.timestamp)

colorizeMessageBubble(message)
Expand Down
Loading
Loading