From 0d6bd401752cf0484e873d55c44c4a9516005e9e Mon Sep 17 00:00:00 2001 From: Arne Date: Thu, 19 Oct 2023 09:34:21 +0200 Subject: [PATCH] Fix call strings and stamps and turn off sending threads when threads icon is disabled --- .../eu/siacs/conversations/ui/adapter/MessageAdapter.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index fba084368b..20223e5814 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -1423,7 +1423,9 @@ public class MessageAdapter extends ArrayAdapter { viewHolder.transfer = view.findViewById(R.id.transfer); viewHolder.progressBar = view.findViewById(R.id.progressBar); viewHolder.cancel_transfer = view.findViewById(R.id.cancel_transfer); - viewHolder.thread_identicon = view.findViewById(R.id.thread_identicon); + if (activity.xmppConnectionService.getBooleanPreference("show_thread_feature", R.bool.show_thread_feature)) { + viewHolder.thread_identicon = view.findViewById(R.id.thread_identicon); + } break; case RECEIVED: view = activity.getLayoutInflater().inflate(R.layout.message_received, parent, false); @@ -1510,8 +1512,10 @@ public class MessageAdapter extends ArrayAdapter { if (received) { if (duration > 0) { viewHolder.status_message.setText(activity.getString(R.string.incoming_call_duration_timestamp, TimeFrameUtils.resolve(activity, duration), UIHelper.readableTimeDifferenceFull(activity, message.getTimeSent()))); + } else if (rtpSessionStatus.successful) { + viewHolder.status_message.setText(R.string.incoming_call); } else { - viewHolder.status_message.setText(activity.getString(R.string.missed_call_timestamp, formattedTime)); + viewHolder.status_message.setText(activity.getString(R.string.missed_call_timestamp, UIHelper.readableTimeDifferenceFull(activity, message.getTimeSent()))); } } else { if (duration > 0) {