Fix forward to multiple string

This commit is contained in:
Hocuri
2020-05-07 13:22:29 +02:00
committed by cyberta
parent 0888bf209e
commit 88bce39088
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -219,6 +219,7 @@
<item quantity="other">Delete %d messages here and on the server?</item>
</plurals>
<string name="ask_forward">Forward messages to %1$s?</string>
<string name="ask_forward_multiple">Forward messages to %1$d chats?</string>
<string name="ask_export_attachment">Export attachment? Exporting attachments will allow any other apps on your device to access them.\n\nContinue?</string>
<string name="ask_block_contact">Block this contact? You will no longer receive messages from this contact.</string>
<string name="ask_unblock_contact">Unblock this contact? You will once again be able to receive messages from this contact.</string>
@@ -81,6 +81,7 @@ import static org.thoughtcrime.securesms.util.RelayUtil.REQUEST_RELAY;
import static org.thoughtcrime.securesms.util.RelayUtil.acquireRelayMessageContent;
import static org.thoughtcrime.securesms.util.RelayUtil.getSharedText;
import static org.thoughtcrime.securesms.util.RelayUtil.getSharedUris;
import static org.thoughtcrime.securesms.util.RelayUtil.isForwarding;
import static org.thoughtcrime.securesms.util.RelayUtil.isRelayingMessageContent;
import static org.thoughtcrime.securesms.util.RelayUtil.resetRelayingMessageContent;
@@ -185,7 +186,9 @@ public class ConversationListFragment extends Fragment
final Set<Long> selectedChats = getListAdapter().getBatchSelections();
ArrayList<Uri> uris = getSharedUris(getActivity());
String message;
if (uris.size() > 0) {
if (isForwarding(getActivity())) {
message = String.format(Locale.getDefault(), getString(R.string.ask_forward_multiple), selectedChats.size());
} else if (uris.size() > 0) {
message = String.format(Locale.getDefault(), getString(R.string.share_multiple_attachments_multiple_chats), uris.size(), selectedChats.size());
} else {
message = String.format(Locale.getDefault(), getString(R.string.share_text_multiple_chats), selectedChats.size(), getSharedText(getActivity()));