Improve view in chat
This commit is contained in:
parent
1c87a98d8a
commit
31e606c3a2
@ -3,8 +3,8 @@ import cn.hutool.core.util.RuntimeUtil
|
||||
apply plugin: "com.android.application"
|
||||
apply plugin: "kotlin-android"
|
||||
|
||||
def verName = "7.7.2-rc02"
|
||||
def verCode = 290 + 3 * 2
|
||||
def verName = "7.7.2"
|
||||
def verCode = 290 + 3 * 3
|
||||
|
||||
if (System.getenv("DEBUG_BUILD") == "true") {
|
||||
verName += "-" + RuntimeUtil.execForStr("git log --pretty=format:'%h' -n 1)")
|
||||
|
@ -1087,8 +1087,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
private final static int save_to = 25;
|
||||
private final static int auto_delete_timer = 26;
|
||||
|
||||
private final static int jump_to_chat = 114514;
|
||||
|
||||
private final static int translate = 101;
|
||||
private final static int show_pinned = 102;
|
||||
private final static int share_key = 103;
|
||||
@ -1098,6 +1096,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
private final static int save = 107;
|
||||
private final static int delete_history = 108;
|
||||
private final static int hide = 109;
|
||||
private final static int view_in_chat = 110;
|
||||
|
||||
private final static int bot_help = 30;
|
||||
private final static int bot_settings = 31;
|
||||
@ -2224,7 +2223,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
return;
|
||||
}
|
||||
presentFragment(new ChatActivity(args));
|
||||
} else if (id == jump_to_chat) { // NekoX: jump button to linked chat
|
||||
} else if (id == view_in_chat) {
|
||||
if (chatInfo == null || threadMessageId == 0)
|
||||
return;
|
||||
Bundle args = new Bundle();
|
||||
@ -2232,7 +2231,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
args.putInt("message_id", threadMessageId);
|
||||
if (!getMessagesController().checkCanOpenChat(args, ChatActivity.this))
|
||||
return;
|
||||
presentFragment(new ChatActivity(args));
|
||||
presentFragment(new ChatActivity(args), true);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -2263,8 +2262,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
ActionBarMenu menu = actionBar.createMenu();
|
||||
|
||||
if (isThreadChat() && threadMessageId != 0 && isComments) {
|
||||
// NekoX: jump button to linked chat
|
||||
menu.addItem(jump_to_chat, R.drawable.menu_chats);
|
||||
menu.addItem(view_in_chat, R.drawable.baseline_forum_24);
|
||||
}
|
||||
|
||||
if (currentEncryptedChat == null && chatMode == 0 && reportType < 0) {
|
||||
@ -19123,6 +19121,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
options.add(27);
|
||||
icons.add(R.drawable.baseline_forum_24);
|
||||
} else if (isThreadChat() && chatMode != MODE_SCHEDULED && currentChat != null) {
|
||||
options.add(205);
|
||||
icons.add(R.drawable.baseline_forum_24);
|
||||
items.add(LocaleController.getString("ViewInChat", R.string.ViewInChat));
|
||||
}
|
||||
if (chatMode != MODE_SCHEDULED && ChatObject.isChannel(currentChat) && selectedObject.getDialogId() != mergeDialogId) {
|
||||
items.add(LocaleController.getString("CopyLink", R.string.CopyLink));
|
||||
@ -19488,6 +19490,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
options.add(27);
|
||||
icons.add(R.drawable.baseline_forum_24);
|
||||
} else if (isThreadChat() && chatMode != MODE_SCHEDULED && currentChat != null) {
|
||||
options.add(205);
|
||||
icons.add(R.drawable.baseline_forum_24);
|
||||
items.add(LocaleController.getString("ViewInChat", R.string.ViewInChat));
|
||||
}
|
||||
if (type == 4) {
|
||||
if (selectedObject.isVideo()) {
|
||||
@ -20986,7 +20992,16 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
selectedObject.messageOwner.hide = true;
|
||||
getMessageHelper().resetMessageContent(dialog_id, selectedObject);
|
||||
}
|
||||
|
||||
}
|
||||
case 205: {
|
||||
if (selectedObject == null)
|
||||
return;
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("chat_id", chatInfo.id);
|
||||
args.putInt("message_id", selectedObject.messageOwner.id);
|
||||
if (!getMessagesController().checkCanOpenChat(args, ChatActivity.this))
|
||||
return;
|
||||
presentFragment(new ChatActivity(args), true);
|
||||
}
|
||||
}
|
||||
selectedObject = null;
|
||||
|
Loading…
Reference in New Issue
Block a user