mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
do not ask on forwarding messages to 'saved messages'
This commit is contained in:
@@ -603,18 +603,22 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
|
||||
private void handleForwarding() {
|
||||
DcChat dcChat = dcContext.getChat(chatId);
|
||||
String name = dcChat.getName();
|
||||
if( !dcChat.isGroup() ) {
|
||||
int[] contactIds = dcContext.getChatContacts(chatId);
|
||||
if( contactIds.length==1 || contactIds.length==2 ) {
|
||||
name = dcContext.getContact(contactIds[0]).getNameNAddr();
|
||||
if (dcChat.isSelfTalk()) {
|
||||
new RelayingTask(this, chatId).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
} else {
|
||||
String name = dcChat.getName();
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user