do not ask on forwarding messages to 'saved messages'

This commit is contained in:
B. Petersen 2020-03-10 00:26:32 +01:00
parent b4c0d56a8c
commit e2a5d93adb
No known key found for this signature in database
GPG key ID: 3B88E92DEA8E9AFC

View file

@ -603,18 +603,22 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private void handleForwarding() { private void handleForwarding() {
DcChat dcChat = dcContext.getChat(chatId); DcChat dcChat = dcContext.getChat(chatId);
String name = dcChat.getName(); if (dcChat.isSelfTalk()) {
if( !dcChat.isGroup() ) { new RelayingTask(this, chatId).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
int[] contactIds = dcContext.getChatContacts(chatId); } else {
if( contactIds.length==1 || contactIds.length==2 ) { String name = dcChat.getName();
name = dcContext.getContact(contactIds[0]).getNameNAddr(); if (!dcChat.isGroup()) {
int[] contactIds = dcContext.getChatContacts(chatId);
if (contactIds.length == 1 || contactIds.length == 2) {
name = dcContext.getContact(contactIds[0]).getNameNAddr();
}
} }
new AlertDialog.Builder(this)
.setMessage(getString(R.string.ask_forward, name))
.setPositiveButton(R.string.ok, (dialogInterface, i) -> new RelayingTask(this, chatId).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR))
.setNegativeButton(R.string.cancel, (dialogInterface, i) -> finish())
.show();
} }
new AlertDialog.Builder(this)
.setMessage(getString(R.string.ask_forward, name))
.setPositiveButton(R.string.ok, (dialogInterface, i) -> new RelayingTask(this, chatId).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR))
.setNegativeButton(R.string.cancel, (dialogInterface, i) -> finish())
.show();
} }
private void handleSharing() { private void handleSharing() {