mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #3635 from deltachat/adb/update-some-strings-usage
avoid using some deprecated strings
This commit is contained in:
@@ -212,16 +212,9 @@ public class ContactSelectionListFragment extends Fragment
|
||||
ContactSelectionListAdapter adapter = getContactSelectionListAdapter();
|
||||
final SparseIntArray actionModeSelection = adapter.getActionModeSelection().clone();
|
||||
new Thread(() -> {
|
||||
boolean failed = false;
|
||||
for (int index = 0; index < actionModeSelection.size(); index++) {
|
||||
int contactId = actionModeSelection.valueAt(index);
|
||||
boolean currentFailed = !dcContext.deleteContact(contactId);
|
||||
failed = currentFailed || failed;
|
||||
}
|
||||
if (failed) {
|
||||
Util.runOnMain(()-> {
|
||||
Toast.makeText(getActivity(), R.string.cannot_delete_contacts_in_use, Toast.LENGTH_LONG).show();
|
||||
});
|
||||
dcContext.deleteContact(contactId);
|
||||
}
|
||||
}).start();
|
||||
adapter.resetActionModeSelection();
|
||||
|
||||
@@ -340,7 +340,7 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity
|
||||
return;
|
||||
}
|
||||
|
||||
String text = getResources().getQuantityString(R.plurals.ask_delete_messages_simple, 1, 1);
|
||||
String text = getResources().getQuantityString(R.plurals.ask_delete_messages, 1, 1);
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setMessage(text);
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class MessageSelectorFragment
|
||||
protected void handleDeleteMessages(int chatId, final int[] messageIds) {
|
||||
DcChat dcChat = DcHelper.getContext(getActivity()).getChat(chatId);
|
||||
|
||||
String text = getActivity().getResources().getQuantityString(R.plurals.ask_delete_messages_simple, messageIds.length, messageIds.length);
|
||||
String text = getActivity().getResources().getQuantityString(R.plurals.ask_delete_messages, messageIds.length, messageIds.length);
|
||||
|
||||
AlertDialog dialog = new AlertDialog.Builder(getActivity())
|
||||
.setMessage(text)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
app:showAsAction="always"/>
|
||||
|
||||
<item android:id="@+id/delete"
|
||||
android:title="@string/menu_delete_messages"
|
||||
android:title="@string/delete"
|
||||
android:icon="@drawable/ic_delete_white_24dp"
|
||||
app:showAsAction="always"/>
|
||||
|
||||
|
||||
@@ -388,6 +388,7 @@
|
||||
<string name="ask_unblock_contact">Unblock this contact?</string>
|
||||
<string name="ask_delete_contacts">Delete contacts?\n\nContacts with ongoing chats or from the system address book cannot be deleted permanently.</string>
|
||||
<string name="ask_delete_contact">Delete contact %1$s?\n\nContacts with ongoing chats or from the system address book cannot be deleted permanently.</string>
|
||||
<!-- deprecated -->
|
||||
<string name="cannot_delete_contacts_in_use">Cannot delete contacts with ongoing chats.</string>
|
||||
<string name="ask_start_chat_with">Chat with %1$s?</string>
|
||||
<!-- deprecated -->
|
||||
|
||||
Reference in New Issue
Block a user