From 406a5a10f9ffa468533c28be1859d6ae62834a31 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 16 Apr 2018 09:55:16 +0200 Subject: [PATCH] removed 'received' prefix from description --- .../conversations/services/NotificationService.java | 4 +--- .../java/eu/siacs/conversations/utils/UIHelper.java | 13 ++----------- src/main/res/values/strings.xml | 2 -- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index e78f00759..ca71da248 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -499,9 +499,7 @@ public class NotificationService { bigPictureStyle.setSummaryText(text); builder.setContentText(text); } else { - builder.setContentText(mXmppConnectionService.getString( - R.string.received_x_file, - UIHelper.getFileDescriptionString(mXmppConnectionService, message))); + builder.setContentText(UIHelper.getFileDescriptionString(mXmppConnectionService, message)); } builder.setStyle(bigPictureStyle); } catch (final FileNotFoundException e) { diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index 8bc9e4b7a..2957f1ab4 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -280,23 +280,14 @@ public class UIHelper { } else if (message.getEncryption() == Message.ENCRYPTION_AXOLOTL_NOT_FOR_THIS_DEVICE) { return new Pair<>(context.getString(R.string.not_encrypted_for_this_device), true); } else if (message.getType() == Message.TYPE_FILE || message.getType() == Message.TYPE_IMAGE) { - if (message.getStatus() == Message.STATUS_RECEIVED) { - return new Pair<>(context.getString(R.string.received_x_file, - getFileDescriptionString(context, message)), true); - } else { - return new Pair<>(getFileDescriptionString(context, message), true); - } + return new Pair<>(getFileDescriptionString(context, message), true); } else { final String body = message.getBody(); if (body.startsWith(Message.ME_COMMAND)) { return new Pair<>(body.replaceAll("^" + Message.ME_COMMAND, UIHelper.getMessageDisplayName(message) + " "), false); } else if (message.isGeoUri()) { - if (message.getStatus() == Message.STATUS_RECEIVED) { - return new Pair<>(context.getString(R.string.received_location), true); - } else { - return new Pair<>(context.getString(R.string.location), true); - } + return new Pair<>(context.getString(R.string.location), true); } else if (message.treatAsDownloadable()) { return new Pair<>(context.getString(R.string.x_file_offered_for_download, getFileDescriptionString(context, message)), true); diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 00a8e049f..0987ec814 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -388,7 +388,6 @@ PDF document Android App Contact - Received %s Touch to open Conversations Avatar has been published! Sending %s @@ -404,7 +403,6 @@ Show location No application found to display location Location - Received location Conversation closed Left group chat Don’t trust system CAs