Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit 5137665

Browse files
yadav-rahultimabbott
authored andcommitted
edit: Add default '(deleted)' string if message has zero length.
1 parent 016cbe3 commit 5137665

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/src/main/java/com/zulip/android/activities/MessageListFragment.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ public void onClick(View view) {
419419
progress.setCancelable(false);
420420
progress.setMessage(app.getString(R.string.editing_message));
421421
progress.show();
422-
final String editedMessageContent = dialogMessageEditText.getText().toString();
422+
final String editedMessageContent =
423+
dialogMessageEditText.getText().toString().length() == 0 ? getString(R.string.default_delete_text) : dialogMessageEditText.getText().toString();
423424

424425
app.getZulipServices()
425426
.editMessage(String.valueOf(message.getID()), editedMessageContent)

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,5 @@
137137
</plurals>
138138
<string name="maximum_time_limit_error">Maximum time limit exceeded</string>
139139
<string name="editing_message_disabled">Editing message is disabled</string>
140+
<string name="default_delete_text">(deleted)</string>
140141
</resources>

0 commit comments

Comments
 (0)