mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-14 08:15:04 +01:00
parent
0e6d531a47
commit
a9a4dd0289
@ -146,15 +146,26 @@ public class ConversationItem extends AbstractFlexibleItem<ConversationItem.Conv
|
||||
holder.dialogLastMessageUserAvatar.setVisibility(View.GONE);
|
||||
holder.dialogLastMessage.setText(conversation.getLastMessage().getText());
|
||||
} else {
|
||||
conversation.getLastMessage().setActiveUserId(userEntity.getUserId());
|
||||
String authorDisplayName = "";
|
||||
conversation.getLastMessage().setActiveUserId(userEntity.getUserId());
|
||||
String text;
|
||||
if (conversation.getLastMessage().getMessageType().equals(ChatMessage.MessageType.REGULAR_TEXT_MESSAGE)) {
|
||||
if (conversation.getLastMessage().getActorId().equals(conversation.getLastMessage().getActiveUserId())) {
|
||||
text = String.format(context.getString(R.string.nc_formatted_message_you), conversation.getLastMessage().getLastMessageDisplayText();
|
||||
} else {
|
||||
authorDisplayName = !TextUtils.isEmpty(conversation.getLastMessage().getActorDisplayName()) ?
|
||||
conversation.getLastMessage().getActorDisplayName() + ": " :
|
||||
NextcloudTalkApplication.getSharedApplication().getString(R.string.nc_guest) + ": ";
|
||||
conversation.getLastMessage().getActorDisplayName() :
|
||||
"guests".equals(conversation.getLastMessage().getActorType()) ?
|
||||
NextcloudTalkApplication.getSharedApplication().getString(R.string.nc_guest) : "";
|
||||
text = String.format(context.getString(R.string.nc_formatted_message),
|
||||
authorDisplayName,
|
||||
conversation.getLastMessage().getLastMessageDisplayText());
|
||||
}
|
||||
} else {
|
||||
text = conversation.getLastMessage().getLastMessageDisplayText();
|
||||
}
|
||||
|
||||
holder.dialogLastMessage.setText(authorDisplayName + conversation.getLastMessage().getLastMessageDisplayText());
|
||||
holder.dialogLastMessage.setText(text);
|
||||
|
||||
int smallAvatarSize = Math.round(context.getResources().getDimension(R.dimen.small_item_height));
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Bottom Navigation -->
|
||||
<string name="nc_settings">Settings</string>
|
||||
|
||||
@ -185,12 +185,15 @@
|
||||
<string name="nc_sent_an_audio" formatted="true">%1$s sent an audio.</string>
|
||||
<string name="nc_sent_a_video" formatted="true">%1$s sent a video.</string>
|
||||
<string name="nc_sent_an_image" formatted="true">%1$s sent an image.</string>
|
||||
<string name="nc_sent_a_link_you">You sent a link.</string>
|
||||
<string name="nc_sent_a_link_you" tools:ignore="ExtraTranslation">You sent a link.</string>
|
||||
<string name="nc_sent_a_gif_you">You sent a GIF.</string>
|
||||
<string name="nc_sent_an_attachment_you">You sent an attachment.</string>
|
||||
<string name="nc_sent_an_audio_you">You sent an audio.</string>
|
||||
<string name="nc_sent_a_video_you">You sent a video.</string>
|
||||
<string name="nc_sent_an_image_you">You sent an image.</string>
|
||||
<string name="nc_formatted_message" translatable="false">%1$s: %2$s</string>
|
||||
<!-- When translating to German, please use non-formal variant -->
|
||||
<string name="nc_formatted_message_you">You: %1$s</string>
|
||||
|
||||
<!-- Contacts endless loading -->
|
||||
<string name="nc_no_more_load_retry">No more items to load. Refresh to retry.</string>
|
||||
|
Loading…
Reference in New Issue
Block a user