mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Fix calling forward function.
This commit is contained in:
@@ -174,7 +174,7 @@ public class MrMailbox {
|
||||
}
|
||||
|
||||
public native static void deleteMsg(int id);
|
||||
public native static void forwardMsg(int msg_ids[], int chat_ids);
|
||||
public native static void forwardMsgs(int msg_ids[], int chat_ids);
|
||||
|
||||
private native static long MrMailboxGetMsg (long hMailbox, int id); // return hMsg which must be unref'd after usage
|
||||
private native static String MrMailboxGetMsgInfo (long hMailbox, int id);
|
||||
|
||||
@@ -2586,19 +2586,36 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didSelectDialog(DialogsActivity dialogsFragment, long chat_id, boolean param)
|
||||
public void didSelectDialog(DialogsActivity dialogsFragment, long fwd_chat_id, boolean param)
|
||||
{
|
||||
Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show();
|
||||
if( selectedMessagesIds.size()>0) {
|
||||
int ids[] = new int[selectedMessagesIds.size()], i = 0;
|
||||
for (HashMap.Entry<Integer, Integer> entry : selectedMessagesIds.entrySet()) {
|
||||
ids[i++] = entry.getKey();
|
||||
}
|
||||
MrMailbox.forwardMsgs(ids, (int)fwd_chat_id);
|
||||
}
|
||||
|
||||
if( fwd_chat_id == dialog_id ) {
|
||||
dialogsFragment.finishFragment(true);
|
||||
actionBar.hideActionMode();
|
||||
updateVisibleRows();
|
||||
}
|
||||
else {
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("chat_id", (int)fwd_chat_id);
|
||||
ChatActivity fragment = new ChatActivity(args);
|
||||
if( presentFragment(fragment, true /*remove last*/) ) {
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
removeSelfFromStack();
|
||||
}
|
||||
}
|
||||
else {
|
||||
dialogsFragment.finishFragment(false);
|
||||
}
|
||||
}
|
||||
|
||||
//MrMailbox.forwardMsg(selectedMessageIds, chat_id);
|
||||
|
||||
actionBar.hideActionMode();
|
||||
updateVisibleRows();
|
||||
|
||||
dialogsFragment.finishFragment(true);
|
||||
|
||||
/*
|
||||
/*
|
||||
if (dialog_id != 0 && (forwaringMessage != null || !selectedMessagesIds.isEmpty() )) {
|
||||
if (forwaringMessage != null) {
|
||||
forwaringMessage = null;
|
||||
|
||||
@@ -134,7 +134,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
if (getArguments() != null) {
|
||||
onlySelect = arguments.getBoolean("onlySelect", false);
|
||||
onlySelectTitle = arguments.getString("onlySelectTitle");
|
||||
if( onlySelectTitle.isEmpty()) {
|
||||
if( onlySelectTitle==null || onlySelectTitle.isEmpty()) {
|
||||
onlySelectTitle = LocaleController.getString("SelectChat", R.string.SelectChat);
|
||||
}
|
||||
selectAlertString = arguments.getString("selectAlertString");
|
||||
|
||||
Reference in New Issue
Block a user