From 9f07a0cba67495ce7d0ec9bbadb5c828adc57840 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Fri, 11 Nov 2016 23:49:14 +0100 Subject: [PATCH] Add an option to view the raw message text. --- TMessagesProj/jni/mr_wrapper.c | 9 + .../org/telegram/messenger/MessageObject.java | 30 +- .../org/telegram/messenger/MrMailbox.java | 1 + .../java/org/telegram/ui/ChatActivity.java | 269 +++++------------- .../src/main/res/drawable-hdpi/ic_ab_info.png | Bin 0 -> 950 bytes .../src/main/res/drawable-mdpi/ic_ab_info.png | Bin 0 -> 673 bytes .../main/res/drawable-xhdpi/ic_ab_info.png | Bin 0 -> 1127 bytes .../main/res/drawable-xxhdpi/ic_ab_info.png | Bin 0 -> 1413 bytes 8 files changed, 81 insertions(+), 228 deletions(-) create mode 100644 TMessagesProj/src/main/res/drawable-hdpi/ic_ab_info.png create mode 100644 TMessagesProj/src/main/res/drawable-mdpi/ic_ab_info.png create mode 100755 TMessagesProj/src/main/res/drawable-xhdpi/ic_ab_info.png create mode 100644 TMessagesProj/src/main/res/drawable-xxhdpi/ic_ab_info.png diff --git a/TMessagesProj/jni/mr_wrapper.c b/TMessagesProj/jni/mr_wrapper.c index fe0a9ab07..f1415cb41 100644 --- a/TMessagesProj/jni/mr_wrapper.c +++ b/TMessagesProj/jni/mr_wrapper.c @@ -209,6 +209,15 @@ JNIEXPORT jlong Java_org_telegram_messenger_MrMailbox_MrMailboxGetMsgById(JNIEnv } +JNIEXPORT jstring Java_org_telegram_messenger_MrMailbox_MrMailboxGetTxtRawById(JNIEnv *env, jclass c, jlong hMailbox, jint msg_id) +{ + char* temp = mrmailbox_get_txt_raw_by_id((mrmailbox_t*)hMailbox, msg_id); + jstring ret = JSTRING_NEW(temp); + free(temp); + return ret; +} + + JNIEXPORT void Java_org_telegram_messenger_MrMailbox_MrMailboxDeleteMsgById(JNIEnv *env, jclass c, jlong hMailbox, jint id) { mrmailbox_delete_msg_by_id((mrmailbox_t*)hMailbox, id); diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java index dc0a9e5fc..b5d5ab31d 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java @@ -1559,35 +1559,7 @@ public class MessageObject { */ public boolean canDeleteMessage(TLRPC.Chat chat) { - return canDeleteMessage(messageOwner, chat); - } - - public static boolean canDeleteMessage(TLRPC.Message message, TLRPC.Chat chat) { - if (message.id < 0) { - return true; - } - if (chat == null && message.to_id.channel_id != 0) { - chat = MessagesController.getInstance().getChat(message.to_id.channel_id); - } - if (ChatObject.isChannel(chat)) { - if (message.id == 1) { - return false; - } - if (chat.creator) { - return true; - } else if (chat.editor) { - if (isOut(message) || message.from_id > 0 && !message.post) { - return true; - } - } else if (chat.moderator) { - if (message.from_id > 0 && !message.post) { - return true; - } - } else if (isOut(message) && message.from_id > 0) { - return true; - } - } - return isOut(message) || !ChatObject.isChannel(chat); + return true; } public String getForwardedName() { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MrMailbox.java b/TMessagesProj/src/main/java/org/telegram/messenger/MrMailbox.java index ee1b3f5b9..dbddbefe9 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MrMailbox.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MrMailbox.java @@ -220,6 +220,7 @@ public class MrMailbox { public native static int MrMailboxCreateChatByContactId(long hMailbox, int contact_id); // returns chat_id public native static int[] MrMailboxGetChatMedia (long hMailbox, int chat_id, int msg_type, int or_msg_type); public native static long MrMailboxGetMsgById (long hMailbox, int id); // return hMsg which must be unref'd after usage + public native static String MrMailboxGetTxtRawById (long hMailbox, int id); public native static void MrMailboxDeleteMsgById (long hMailbox, int id); public native static int MrMailboxSetConfig (long hMailbox, String key, String value); // value may be NULL public native static String MrMailboxGetConfig (long hMailbox, String key, String def); // def may be NULL, returns empty string as NULL diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index e597978f0..a226bae80 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -220,7 +220,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not private int loadingPinnedMessage; private ObjectAnimator pagedownButtonAnimation; - private AnimatorSet replyButtonAnimation; + private ObjectAnimator iconAnimator; private boolean openSearchKeyboard; @@ -257,7 +257,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not private boolean isBroadcast; // always false private HashMap[] selectedMessagesIds = new HashMap[]{new HashMap<>(), new HashMap<>()}; private HashMap[] selectedMessagesCanCopyIds = new HashMap[]{new HashMap<>(), new HashMap<>()}; - private int cantDeleteMessagesCount; private ArrayList waitingForLoad = new ArrayList<>(); private int newUnreadMessageCount; @@ -312,7 +311,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not //private float startX = 0; //private float startY = 0; - private final static int copy = 10; + private final static int id_copy = 10; private final static int id_forward = 11; private final static int id_delete_messages = 12; private final static int chat_menu_attach = 14; @@ -321,8 +320,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not private final static int share_contact = 17; private final static int mute = 18; private final static int id_reply = 19; - private final static int edit_done = 20; - private final static int report = 21; + private final static int id_info = 20; private final static int attach_photo = 0; private final static int attach_gallery = 1; @@ -384,9 +382,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not // /EDIT BY MR inlineReturn = arguments.getLong("inline_return", 0); - String inlineQuery = arguments.getString("inline_query"); startLoadFromMessageId = arguments.getInt("message_id", 0); - int migrated_to = arguments.getInt("migrated_to", 0); scrollToTopOnResume = arguments.getBoolean("scrollToTopOnResume", false); /* EDIT BY MR @@ -449,52 +445,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not MessagesController.getInstance().sendBotStart(currentUser, inlineQuery); } } else if (encId != 0) { - currentEncryptedChat = MessagesController.getInstance().getEncryptedChat(encId); - if (currentEncryptedChat == null) { - final Semaphore semaphore = new Semaphore(0); - MessagesStorage.getInstance().getStorageQueue().postRunnable(new Runnable() { - @Override - public void run() { - currentEncryptedChat = MessagesStorage.getInstance().getEncryptedChat(encId); - semaphore.release(); - } - }); - try { - semaphore.acquire(); - } catch (Exception e) { - FileLog.e("tmessages", e); - } - if (currentEncryptedChat != null) { - MessagesController.getInstance().putEncryptedChat(currentEncryptedChat, true); - } else { - return false; - } - } - currentUser = MessagesController.getInstance().getUser(currentEncryptedChat.user_id); - if (currentUser == null) { - final Semaphore semaphore = new Semaphore(0); - MessagesStorage.getInstance().getStorageQueue().postRunnable(new Runnable() { - @Override - public void run() { - currentUser = MessagesStorage.getInstance().getUser(currentEncryptedChat.user_id); - semaphore.release(); - } - }); - try { - semaphore.acquire(); - } catch (Exception e) { - FileLog.e("tmessages", e); - } - if (currentUser != null) { - MessagesController.getInstance().putUser(currentUser, true); - } else { - return false; - } - } - dialog_id = ((long) encId) << 32; - maxMessageId[0] = maxMessageId[1] = Integer.MIN_VALUE; - minMessageId[0] = minMessageId[1] = Integer.MAX_VALUE; - MediaController.getInstance().startMediaObserver(); + // ... } else { return false; } @@ -688,18 +639,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if (AndroidUtilities.isTablet()) { NotificationCenter.getInstance().postNotificationName(NotificationCenter.openedChatChanged, dialog_id, true); } - /* - if (currentEncryptedChat != null) { - MediaController.getInstance().stopMediaObserver(); - try { - if (Build.VERSION.SDK_INT >= 23) { - getParentActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE); - } - } catch (Throwable e) { - FileLog.e("tmessages", e); - } - } - */ + /* if (currentUser != null) { MessagesController.getInstance().cancelLoadFullUser(currentUser.id); @@ -734,7 +674,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not selectedMessagesIds[a].clear(); selectedMessagesCanCopyIds[a].clear(); } - cantDeleteMessagesCount = 0; hasOwnBackground = true; if (chatAttachAlert != null){ @@ -755,18 +694,13 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not selectedMessagesIds[a].clear(); selectedMessagesCanCopyIds[a].clear(); } - cantDeleteMessagesCount = 0; - /*if (chatActivityEnterView.isEditingMessage()) { - chatActivityEnterView.setEditingMessageObject(null, false); - } else*/ { - actionBar.hideActionMode(); - updatePinnedMessageView(true); - } + actionBar.hideActionMode(); + updatePinnedMessageView(true); updateVisibleRows(); } else { finishFragment(); } - } else if (id == copy) { + } else if (id == id_copy) { String str = ""; int previousUid = 0; for (int a = 1; a >= 0; a--) { @@ -793,16 +727,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not selectedMessagesIds[a].clear(); selectedMessagesCanCopyIds[a].clear(); } - cantDeleteMessagesCount = 0; + actionBar.hideActionMode(); updatePinnedMessageView(true); updateVisibleRows(); - } else if (id == edit_done) { - /* - if (chatActivityEnterView != null && (chatActivityEnterView.isEditingCaption() || chatActivityEnterView.hasText())) { - chatActivityEnterView.doneEditingMessage(); - } - */ } else if (id == id_delete_messages) { if (getParentActivity() == null) { return; @@ -824,7 +752,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if (getParentActivity() == null) { return; } - final boolean isChat = (int) dialog_id < 0 && (int) (dialog_id >> 32) != 1; + AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); int totalMessagesCount = MrMailbox.MrChatGetTotalMsgCount(m_hChat); @@ -883,8 +811,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } } else if (id == mute) { toggleMute(); - } else if (id == report) { - //showDialog(AlertsCreator.createReportAlert(getParentActivity(), dialog_id, ChatActivity.this)); -- EDIT BY MR } else if (id == id_reply) { if( MrMailbox.MrChatGetId(m_hChat)==MrMailbox.MR_CHAT_ID_STRANGERS ){ if( selectedMessagesIds[0]!=null && selectedMessagesIds[0].size()==1) { @@ -908,11 +834,27 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not showReplyPanel(true, messageObject, null, null, false, true); } */ - cantDeleteMessagesCount = 0; actionBar.hideActionMode(); updatePinnedMessageView(true); updateVisibleRows(); } + } else if (id == id_info) { + if( selectedMessagesIds[0]!=null && selectedMessagesIds[0].size()==1) { + ArrayList ids = new ArrayList<>(selectedMessagesIds[0].keySet()); + String info_str = MrMailbox.MrMailboxGetTxtRawById(MrMailbox.hMailbox, ids.get(0)); + + AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); + builder.setMessage(info_str); + builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + ; + } + }); + showDialog(builder.create()); + } + actionBar.hideActionMode(); + updateVisibleRows(); } else if (id == chat_menu_attach) { if (getParentActivity() == null) { return; @@ -1004,9 +946,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if (searchItem != null) { headerItem.addSubItem(search, LocaleController.getString("Search", R.string.Search), 0); } - if (ChatObject.isChannel(currentChat) && !currentChat.creator && (!currentChat.megagroup || currentChat.username != null && currentChat.username.length() > 0)) { - headerItem.addSubItem(report, LocaleController.getString("ReportChat", R.string.ReportChat), 0); - } + if (currentUser != null) { addContactItem = headerItem.addSubItem(share_contact, "", 0); } @@ -1032,17 +972,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } } - - - - /* - if (currentUser != null && currentEncryptedChat == null && currentUser.bot) { - headerItem.addSubItem(bot_settings, LocaleController.getString("BotSettings", R.string.BotSettings), 0); - headerItem.addSubItem(bot_help, LocaleController.getString("BotHelp", R.string.BotHelp), 0); - updateBotButtons(); - } - */ - updateTitle(); avatarContainer.updateOnlineCount(); avatarContainer.updateSubtitle(); @@ -1125,19 +1054,11 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not actionModeSubTextView.setGravity(Gravity.LEFT); actionModeSubTextView.setTextColor(Theme.ACTION_BAR_ACTION_MODE_TEXT_COLOR); actionModeTitleContainer.addView(actionModeSubTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); + actionModeViews.add(actionMode.addItem(id_info, R.drawable.ic_ab_info, Theme.ACTION_BAR_MODE_SELECTOR_COLOR, null, AndroidUtilities.dp(54))); actionModeViews.add(actionMode.addItem(id_reply, R.drawable.ic_ab_reply, Theme.ACTION_BAR_MODE_SELECTOR_COLOR, null, AndroidUtilities.dp(54))); - actionModeViews.add(actionMode.addItem(copy, R.drawable.ic_ab_fwd_copy, Theme.ACTION_BAR_MODE_SELECTOR_COLOR, null, AndroidUtilities.dp(54))); + actionModeViews.add(actionMode.addItem(id_copy, R.drawable.ic_ab_fwd_copy, Theme.ACTION_BAR_MODE_SELECTOR_COLOR, null, AndroidUtilities.dp(54))); actionModeViews.add(actionMode.addItem(id_delete_messages, R.drawable.ic_ab_fwd_delete, Theme.ACTION_BAR_MODE_SELECTOR_COLOR, null, AndroidUtilities.dp(54))); actionModeViews.add(actionMode.addItem(id_forward, R.drawable.ic_ab_fwd_forward, Theme.ACTION_BAR_MODE_SELECTOR_COLOR, null, AndroidUtilities.dp(54))); - //actionModeViews.add(editDoneItem = actionMode.addItem(edit_done, R.drawable.check_blue, Theme.ACTION_BAR_MODE_SELECTOR_COLOR, null, AndroidUtilities.dp(54))); - //editDoneItem.setVisibility(View.GONE); - //editDoneItemProgress = new ContextProgressView(context); - //editDoneItem.addView(editDoneItemProgress, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); - //editDoneItemProgress.setVisibility(View.INVISIBLE); - - - actionMode.getItem(copy).setVisibility(selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() != 0 ? View.VISIBLE : View.GONE); - actionMode.getItem(id_delete_messages).setVisibility(cantDeleteMessagesCount == 0 ? View.VISIBLE : View.GONE); checkActionBarMenu(); fragmentView = new SizeNotifierFrameLayout(context) { @@ -4213,84 +4134,52 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if (messageObject.type == 0 || messageObject.caption != null) { selectedMessagesCanCopyIds[index].remove(messageObject.getId()); } - if (!messageObject.canDeleteMessage(currentChat)) { - cantDeleteMessagesCount--; - } } else { selectedMessagesIds[index].put(messageObject.getId(), messageObject); if (messageObject.type == 0 || messageObject.caption != null) { selectedMessagesCanCopyIds[index].put(messageObject.getId(), messageObject); } - if (!messageObject.canDeleteMessage(currentChat)) { - cantDeleteMessagesCount++; - } } if (actionBar.isActionModeShowed()) { if (selectedMessagesIds[0].isEmpty() && selectedMessagesIds[1].isEmpty()) { actionBar.hideActionMode(); updatePinnedMessageView(true); } else { - int copyVisible = actionBar.createActionMode().getItem(copy).getVisibility(); - actionBar.createActionMode().getItem(copy).setVisibility(selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() != 0 ? View.VISIBLE : View.GONE); - int newCopyVisible = actionBar.createActionMode().getItem(copy).getVisibility(); - actionBar.createActionMode().getItem(id_delete_messages).setVisibility(cantDeleteMessagesCount == 0 ? View.VISIBLE : View.GONE); - final ActionBarMenuItem replyItem = actionBar.createActionMode().getItem(id_reply); - if (replyItem != null) { - boolean allowChatActions = true; - if (currentEncryptedChat != null && AndroidUtilities.getPeerLayerVersion(currentEncryptedChat.layer) < 46 || isBroadcast || currentChat != null && (ChatObject.isNotInChat(currentChat) || ChatObject.isChannel(currentChat) && !currentChat.creator && !currentChat.editor && !currentChat.megagroup)) { - allowChatActions = false; - } - final int newVisibility = allowChatActions && selectedMessagesIds[0].size() + selectedMessagesIds[1].size() == 1 ? View.VISIBLE : View.GONE; - if (replyItem.getVisibility() != newVisibility) { - if (replyButtonAnimation != null) { - replyButtonAnimation.cancel(); - } - if (copyVisible != newCopyVisible) { - if (newVisibility == View.VISIBLE) { - replyItem.setAlpha(1.0f); - replyItem.setScaleX(1.0f); - } else { - replyItem.setAlpha(0.0f); - replyItem.setScaleX(0.0f); - } - replyItem.setVisibility(newVisibility); - } else { - replyButtonAnimation = new AnimatorSet(); - replyItem.setPivotX(AndroidUtilities.dp(54)); - if (newVisibility == View.VISIBLE) { - replyItem.setVisibility(newVisibility); - replyButtonAnimation.playTogether( - ObjectAnimator.ofFloat(replyItem, "alpha", 1.0f), - ObjectAnimator.ofFloat(replyItem, "scaleX", 1.0f) - ); - } else { - replyButtonAnimation.playTogether( - ObjectAnimator.ofFloat(replyItem, "alpha", 0.0f), - ObjectAnimator.ofFloat(replyItem, "scaleX", 0.0f) - ); - } - replyButtonAnimation.setDuration(100); - replyButtonAnimation.addListener(new AnimatorListenerAdapterProxy() { - @Override - public void onAnimationEnd(Animator animation) { - if (replyButtonAnimation != null && replyButtonAnimation.equals(animation)) { - if (newVisibility == View.GONE) { - replyItem.setVisibility(View.GONE); - } - } - } + final int newVisibility = selectedMessagesIds[0].size() + selectedMessagesIds[1].size() == 1 ? View.VISIBLE : View.GONE; - @Override - public void onAnimationCancel(Animator animation) { - if (replyButtonAnimation != null && replyButtonAnimation.equals(animation)) { - replyButtonAnimation = null; - } - } - }); - replyButtonAnimation.start(); + final ActionBarMenuItem infoItem = actionBar.createActionMode().getItem(id_info); + final ActionBarMenuItem replyItem = actionBar.createActionMode().getItem(id_reply); + + if (infoItem != null && replyItem != null + && (infoItem.getVisibility() != newVisibility || replyItem.getVisibility()!=newVisibility)) { + if( iconAnimator != null ) { + iconAnimator.cancel(); + iconAnimator = null; + } + iconAnimator = ObjectAnimator.ofFloat(this, "progress", 1, 0); + iconAnimator.setDuration(100); + iconAnimator.addListener(new AnimatorListenerAdapterProxy() { + @Override + public void onAnimationEnd(Animator animation) { + iconAnimator = null; + if( newVisibility==View.VISIBLE) { + infoItem.setVisibility(newVisibility); + } + else { + replyItem.setVisibility(newVisibility); + } } + }); + iconAnimator.start(); + + if( newVisibility==View.VISIBLE) { + replyItem.setVisibility(newVisibility); + } + else { + infoItem.setVisibility(newVisibility); } } + } } } @@ -5912,7 +5801,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not selectedMessagesIds[a].clear(); selectedMessagesCanCopyIds[a].clear(); } - cantDeleteMessagesCount = 0; + actionBar.hideActionMode(); updatePinnedMessageView(true); @@ -6911,7 +6800,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not selectedMessagesCanCopyIds[a].clear(); selectedMessagesIds[a].clear(); } - cantDeleteMessagesCount = 0; actionBar.hideActionMode(); updatePinnedMessageView(true); @@ -6942,15 +6830,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not items.add(LocaleController.getString("Reply", R.string.Reply)); options.add(8); } - if (message.canDeleteMessage(currentChat)) { - items.add(LocaleController.getString("Delete", R.string.Delete)); - options.add(1); - } + + items.add(LocaleController.getString("Delete", R.string.Delete)); + options.add(1); } else { - if (message.canDeleteMessage(currentChat)) { - items.add(LocaleController.getString("Delete", R.string.Delete)); - options.add(1); - } + items.add(LocaleController.getString("Delete", R.string.Delete)); + options.add(1); } } else if (type == 20) { items.add(LocaleController.getString("Retry", R.string.Retry)); @@ -7022,10 +6907,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not items.add(LocaleController.getString("Forward", R.string.Forward)); options.add(2); - if (message.canDeleteMessage(currentChat)) { - items.add(LocaleController.getString("Delete", R.string.Delete)); - options.add(1); - } + items.add(LocaleController.getString("Delete", R.string.Delete)); + options.add(1); } @@ -7059,14 +6942,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not // handle long clicks final ActionBarMenu actionMode = actionBar.createActionMode(); - View item = actionMode.getItem(id_forward); - if (item != null) { - item.setVisibility(View.VISIBLE); - } - item = actionMode.getItem(id_delete_messages); - if (item != null) { - item.setVisibility(View.VISIBLE); - } actionBar.showActionMode(); updatePinnedMessageView(true); @@ -7329,7 +7204,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not selectedMessagesCanCopyIds[a].clear(); selectedMessagesIds[a].clear(); } - cantDeleteMessagesCount = 0; + actionBar.hideActionMode(); updatePinnedMessageView(true); } @@ -7344,9 +7219,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } else if (lower_part < 0) { args.putInt("chat_id", -lower_part); } - /*if (!MessagesController.checkCanOpenChat(args, activity)) { - return; - }*/ ChatActivity chatActivity = new ChatActivity(args); if (presentFragment(chatActivity, true)) { @@ -7383,7 +7255,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not //chatActivityEnterView.setEditingMessageObject(null, false); actionBar.hideActionMode(); updatePinnedMessageView(true); - cantDeleteMessagesCount = 0; updateVisibleRows(); return false; } else if (chatActivityEnterView.isPopupShowing()) { diff --git a/TMessagesProj/src/main/res/drawable-hdpi/ic_ab_info.png b/TMessagesProj/src/main/res/drawable-hdpi/ic_ab_info.png new file mode 100644 index 0000000000000000000000000000000000000000..905135a22d4e7ce6de9ec4b5cee209c7c7d19097 GIT binary patch literal 950 zcmV;n14;aeP)23G<# zCXLbrL|{RCE1|<}f?VwFifaU_1jZ1IiZmv!jAK$If&{gO$cEHP(g^N`ozI1LkCU`} zw|lur_6Jwon|W`4JOB2*p(MObny%|Wk}E4KUl?OP1u!q^63KZ0kaR%uC4d9x+`KS;FF5+UjW$hJa1=XW8?3M0QtT@<9XhF0N;?jP!Z&qBpm_R zw$`q9I-Ty=Kw%ipk=&JZt)$C7fZtEpt^l}P_%L!$(qa@vuWADYL2%m`^ANynDKYR_ z6h*%c8p1HV4&c`zK8Mb^ui`jVmqN(W6a|q2yRyb3d3+N8<|4b z3CS2^9)@8!Hx$VC{TY(G7%?)r(lliiTZv{#?)ttzGiW?^4tbt;f5-wpC1cFJ)z#Hs z25lriuj()9TDF5%`u_Q%Znat$d%fOY<8JM7CF!WqXndTXQ~fEk)-Ihj3;>Y4kR7-H zvMD3UX0y3mF~(C#4@j0BU^f9Qm9&*~1>;3ELHBw>1b`h!Wp3@V?pgGmRjtDM0AK$do%t8#{Xm!10v zA!9HA;GEkZCqkO06DwJA1_J;|l03(oguIrfrlzW<8l&_gW9Tnx0obbO{1bo$01L*L zQ&VlNeM$0e_A5+N3$&G&OZ{!{dEQR1*ZXeN7hlq&cDwy!S$mQs{{Z*_0GiF_dn5}} z)q!|NjYeZ9|KCqPvV3HF#GCvd+8(Ugj-{~H+I5n9XGKDC&sw`aXgdbf>2$i176BX% ziSvGqXAbLoC~5Iz;aFIg4U|DemB+s%{}@%Xlcc1}06r{ecFwswMYY*~EfmL5{X!7{ zGKZ^^TvJ)Bt7R}lfdC+iqF3E+_lBg+?80CyNjj3W+3j|346Eybckw#rl*8L{VRcq| Y4G61@9E1`zb^rhX07*qoM6N<$g0mf|@&Et; literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-mdpi/ic_ab_info.png b/TMessagesProj/src/main/res/drawable-mdpi/ic_ab_info.png new file mode 100644 index 0000000000000000000000000000000000000000..c79f3d9dba3e43ce87bd9e7ba67877796965fa87 GIT binary patch literal 673 zcmV;S0$%-zP)^QhQ55Y0fMFPO*L82J)KQs0zu$jGL?-|a0BmQ57XZf0d=>=3w3dKv+wC+> z&zX6zQkO(CA;i&OF!+`o6WM@inuke}TxH3bc|VThoj8tnn0Y@lwwENym1&xXr2;D9 z0zf01n5OA<7=|}t7~Z65dYvPGMb)6c+$sOY87Fuk$6Olpjpf z{Gq-dl?XHxR|im=tWL|9f9_oaGd~Z4V7dhW>L?Z^zGLQz9uq>e0lY60P@L1{5*?HX zOoqeZXFb;I^}b6f%cr0?h2uC)tY4xPq?ELYsQ}xK<21$c`WJzjk1flxyWQ@Cx(ZPg z?XF$49K2y>S4#P?t^fcC!!YLeDXap+Fy=zJ;$l;>l(L%b{>8#|-P`37jW=Z{Nm6&S z$AGd5WU&dmK^wBkA5ER``hvxuGat?R9ehe00000NkvXX Hu0mjfqhKQ1 literal 0 HcmV?d00001 diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/ic_ab_info.png b/TMessagesProj/src/main/res/drawable-xhdpi/ic_ab_info.png new file mode 100755 index 0000000000000000000000000000000000000000..800c83efb978fa38d0ded9717863a80e874c5abe GIT binary patch literal 1127 zcmV-t1ep7YP)p&Ve2iG{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