diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-29 15:06:44 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-29 15:06:44 +0200 |
commit | 71f60cfc3ff9b90d8e53b1e54190761aaf0bd0b3 (patch) | |
tree | 76ff526fea562a39563d23608d9d662fa63d6d39 /src/main/java | |
parent | e129b50c285c8d550021c1d6015867fa794c9389 (diff) |
removed 'received' prefix from description
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/NotificationService.java | 4 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/UIHelper.java | 22 |
2 files changed, 5 insertions, 21 deletions
diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java index 5e6081155..cb76691a7 100644 --- a/src/main/java/de/pixart/messenger/services/NotificationService.java +++ b/src/main/java/de/pixart/messenger/services/NotificationService.java @@ -509,9 +509,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/de/pixart/messenger/utils/UIHelper.java b/src/main/java/de/pixart/messenger/utils/UIHelper.java index 217425cad..ea9f97f98 100644 --- a/src/main/java/de/pixart/messenger/utils/UIHelper.java +++ b/src/main/java/de/pixart/messenger/utils/UIHelper.java @@ -275,29 +275,15 @@ 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); + 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.isXmppUri()) { - if (message.getStatus() == Message.STATUS_RECEIVED) { - return new Pair<>(context.getString(R.string.received_contact), true); - } else { - return new Pair<>(context.getString(R.string.contact), true); - } + return new Pair<>(context.getString(R.string.contact), true); } else if (message.treatAsDownloadable()) { return new Pair<>(context.getString(R.string.x_file_offered_for_download, getFileDescriptionString(context, message)), true); |