From a648d837a6a342d1ad4cd26532860fc20e89b6f2 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Mon, 3 Jun 2024 23:18:41 +0800 Subject: [PATCH 1/2] fix: chat message touch select --- .../src/main/java/org/telegram/ui/Cells/ChatMessageCell.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java index 7f246c108..5530d32bf 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java @@ -4423,7 +4423,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate private boolean checkTextSelection(MotionEvent event) { TextSelectionHelper.ChatListTextSelectionHelper textSelectionHelper = delegate.getTextSelectionHelper(); - if (textSelectionHelper == null/* || MessagesController.getInstance(currentAccount).isChatNoForwards(currentMessageObject.getChatId()) || (currentMessageObject.messageOwner != null && currentMessageObject.messageOwner.noforwards)*/ || NekoXConfig.disableFlagSecure) { + if (textSelectionHelper == null/* || MessagesController.getInstance(currentAccount).isChatNoForwards(currentMessageObject.getChatId()) || (currentMessageObject.messageOwner != null && currentMessageObject.messageOwner.noforwards)*/) { return false; } boolean hasTextBlocks = currentMessageObject.textLayoutBlocks != null && !currentMessageObject.textLayoutBlocks.isEmpty(); From ffc1d7429b26800945c3ed76766e2a009c4e6c0c Mon Sep 17 00:00:00 2001 From: xtaodada Date: Tue, 4 Jun 2024 21:10:17 +0800 Subject: [PATCH 2/2] chore: add setting for show time hint --- .../src/main/java/org/telegram/ui/ChatActivity.java | 4 +++- .../nekogram/settings/NekoChatSettingsActivity.java | 1 + .../src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt | 6 ++++++ TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml | 1 + TMessagesProj/src/main/res/values/strings_na.xml | 1 + 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 69d73c0de..17b6f269a 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -36406,7 +36406,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not @Override public void didPressTime(ChatMessageCell cell) { if (!cell.getMessageObject().isImportedForward()) { - showTimeHint(cell); + if (NaConfig.INSTANCE.getShowTimeHint().Bool()) { + showTimeHint(cell); + } return; } createUndoView(); diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoChatSettingsActivity.java b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoChatSettingsActivity.java index a1a42d3ef..e644f8739 100644 --- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoChatSettingsActivity.java +++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoChatSettingsActivity.java @@ -157,6 +157,7 @@ public class NekoChatSettingsActivity extends BaseNekoXSettingsActivity implemen private final AbstractConfigCell disableClickCommandToSendRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableClickCommandToSend(), LocaleController.getString(R.string.DisableClickCommandToSendHint))); private final AbstractConfigCell showQuickReplyInBotCommandsRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getShowQuickReplyInBotCommands())); private final AbstractConfigCell disablePreviewVideoSoundShortcutRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisablePreviewVideoSoundShortcut(), LocaleController.getString(R.string.DisablePreviewVideoSoundShortcutNotice))); + private final AbstractConfigCell showTimeHintRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getShowTimeHint())); private final AbstractConfigCell dividerInteractions = cellGroup.appendCell(new ConfigCellDivider()); // Sticker diff --git a/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt b/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt index 7f67b8fe1..2a710153f 100644 --- a/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt +++ b/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt @@ -614,6 +614,12 @@ object NaConfig { ConfigItem.configTypeBool, true ) + val showTimeHint = + addConfig( + "ShowTimeHint", + ConfigItem.configTypeBool, + true + ) private fun addConfig( k: String, diff --git a/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml b/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml index 595d4d5cf..1e2582f44 100644 --- a/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml +++ b/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml @@ -155,4 +155,5 @@ 您可以使用网站 regex101.com]]> 来测试您的正则表达式。 您也可以使用纯文本,但请不要忘记使用转义符号。 正则表达式语法错误 + 点击消息时间显示详细信息 diff --git a/TMessagesProj/src/main/res/values/strings_na.xml b/TMessagesProj/src/main/res/values/strings_na.xml index 3323a154c..8cabff370 100644 --- a/TMessagesProj/src/main/res/values/strings_na.xml +++ b/TMessagesProj/src/main/res/values/strings_na.xml @@ -155,4 +155,5 @@ You can use site regex101.com]]> to fully test your regular expression. You can also use plain text, but don\'t forget to escape brackets. Regex syntax error + Click message time to display details