diff options
Diffstat (limited to 'src/main')
7 files changed, 15 insertions, 9 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java index ad5a4132..5e9f8fbf 100644 --- a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java +++ b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java @@ -162,7 +162,7 @@ public class PgpEngine { String[] lines = os.toString().split("\n"); for (int i = 2; i < lines.length - 1; ++i) { if (!lines[i].contains("Version")) { - encryptedMessageBody.append(lines[i].trim()); + encryptedMessageBody.append(lines[i]); } } message.setEncryptedBody(encryptedMessageBody diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java index 8015eead..fc2fdafd 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -393,9 +393,9 @@ public class Message extends AbstractEntity { public String getMergedBody() { final Message next = this.next(); if (this.mergeable(next)) { - return getBody().trim() + '\n' + next.getMergedBody(); + return getBody() + '\n' + next.getMergedBody(); } - return getBody().trim(); + return getBody(); } public boolean hasMeCommand() { diff --git a/src/main/java/eu/siacs/conversations/ui/ChangePasswordActivity.java b/src/main/java/eu/siacs/conversations/ui/ChangePasswordActivity.java index 54c064c6..aac435fd 100644 --- a/src/main/java/eu/siacs/conversations/ui/ChangePasswordActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ChangePasswordActivity.java @@ -27,11 +27,14 @@ public class ChangePasswordActivity extends XmppActivity implements XmppConnecti mCurrentPassword.requestFocus(); mCurrentPassword.setError(getString(R.string.account_status_unauthorized)); } else if (!newPassword.equals(newPasswordConfirm)) { - mNewPasswordConfirm.requestFocus(); - mNewPasswordConfirm.setError(getString(R.string.passwords_do_not_match)); + mNewPasswordConfirm.requestFocus(); + mNewPasswordConfirm.setError(getString(R.string.passwords_do_not_match)); + } else if (newPassword.isEmpty()) { + mNewPassword.requestFocus(); + mNewPassword.setError(getString(R.string.password_should_not_be_empty)); } else if (newPassword.trim().isEmpty()) { mNewPassword.requestFocus(); - mNewPassword.setError(getString(R.string.password_should_not_be_empty)); + mNewPassword.setError(getString(R.string.password_should_not_contain_only_spaces)); } else { mCurrentPassword.setError(null); mNewPassword.setError(null); diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index d5f20e41..4da9d101 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -545,7 +545,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa } protected void highlightInConference(String nick) { - String oldString = mEditMessage.getText().toString().trim(); + String oldString = mEditMessage.getText().toString(); if (oldString.isEmpty() || mEditMessage.getSelectionStart() == 0) { mEditMessage.getText().insert(0, nick + ": "); } else { diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index 0ddf606f..0bea6e53 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -226,7 +226,6 @@ public class UIHelper { for (EmoticonPattern p : patterns) { body = p.replaceAll(body); } - body = body.trim(); } return body; } @@ -302,7 +301,7 @@ public class UIHelper { return new Pair<>(context.getString(R.string.location), true); } } else{ - return new Pair<>(message.getBody().trim(), false); + return new Pair<>(message.getBody(), false); } } } diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml index 14e5b091..5e75f55c 100644 --- a/src/main/res/values-de/strings.xml +++ b/src/main/res/values-de/strings.xml @@ -370,6 +370,7 @@ <string name="current_password">Aktuelles Passwort</string> <string name="new_password">Neues Passwort</string> <string name="password_should_not_be_empty">Das Passwort darf nicht leer sein</string> + <string name="password_should_not_contain_only_spaces">Das Passwort darf nicht nur aus Leerzeichen bestehen</string> <string name="enable_all_accounts">Alle Konten anschalten</string> <string name="disable_all_accounts">Alle Konten abschalten</string> <string name="perform_action_with">Aktion durchführen mit</string> diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index b6e897cf..f6abfc66 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -397,6 +397,7 @@ <string name="current_password">Current password</string> <string name="new_password">New password</string> <string name="password_should_not_be_empty">Password should not be empty</string> + <string name="password_should_not_contain_only_spaces">Password should not contain only spaces</string> <string name="enable_all_accounts">Enable all accounts</string> <string name="disable_all_accounts">Disable all accounts</string> <string name="perform_action_with">Perform action with</string> @@ -460,4 +461,6 @@ <item quantity="one">Select %d contact</item> <item quantity="other">Select %d contacts</item> </plurals> + <string name="pref_led_notification_color">LED notification color</string> + <string name="pref_led_notification_color_summary">Change the color of the LED notification</string> </resources> |