diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-09-01 10:58:26 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-09-01 10:58:26 +0200 |
commit | 0ffdb03aa3fb5840989f149e733c4d6cdf98c9ad (patch) | |
tree | 78b21bb19f9473c7a30060a455f7d09f78f906b2 /src/eu/siacs/conversations/entities/Message.java | |
parent | 271b0f9c5852fcf6aed92421fc3d5802f930e383 (diff) | |
parent | 2acf510ea97666919ac066a2bf312f47a386ac56 (diff) |
Merge pull request #402 from emdete/remove_poormans_tostring
optimize string operations a bit
Diffstat (limited to 'src/eu/siacs/conversations/entities/Message.java')
-rw-r--r-- | src/eu/siacs/conversations/entities/Message.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java index 84aac4f5..f36ffa90 100644 --- a/src/eu/siacs/conversations/entities/Message.java +++ b/src/eu/siacs/conversations/entities/Message.java @@ -150,13 +150,13 @@ public class Message extends AbstractEntity { public String getReadableBody(Context context) { if ((encryption == ENCRYPTION_PGP) && (type == TYPE_TEXT)) { - return "" + context.getText(R.string.encrypted_message_received); + return context.getText(R.string.encrypted_message_received).toString(); } else if ((encryption == ENCRYPTION_OTR) && (type == TYPE_IMAGE)) { - return "" + context.getText(R.string.encrypted_image_received); + return context.getText(R.string.encrypted_image_received).toString(); } else if (encryption == ENCRYPTION_DECRYPTION_FAILED) { - return "" + context.getText(R.string.decryption_failed); + return context.getText(R.string.decryption_failed).toString(); } else if (type == TYPE_IMAGE) { - return "" + context.getText(R.string.image_file); + return context.getText(R.string.image_file).toString(); } else { return body.trim(); } |