Skip to content

Commit

Permalink
feat: Show Quick Reply In Bot Commands
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Mar 9, 2024
1 parent 342627b commit 774ee4d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2527,7 +2527,9 @@ public boolean onFragmentCreate() {
hasQuickReplies = false;
if (currentUser != null && chatMode == 0 && !currentUser.bot) {
QuickRepliesController.getInstance(currentAccount).load();
// hasQuickReplies = QuickRepliesController.getInstance(currentAccount).hasReplies();
if (NaConfig.INSTANCE.getShowQuickReplyInBotCommands().Bool()) {
hasQuickReplies = QuickRepliesController.getInstance(currentAccount).hasReplies();
}
}
} else if (encId != 0) {
currentEncryptedChat = getMessagesController().getEncryptedChat(encId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public class NekoChatSettingsActivity extends BaseNekoXSettingsActivity implemen
private final AbstractConfigCell doNotUnarchiveBySwipeRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDoNotUnarchiveBySwipe()));
private final AbstractConfigCell disableMarkdownRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableMarkdown()));
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 dividerInteractions = cellGroup.appendCell(new ConfigCellDivider());

// Sticker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,12 @@ object NaConfig {
ConfigItem.configTypeBool,
false
)
val showQuickReplyInBotCommands =
addConfig(
"ShowQuickReplyInBotCommands",
ConfigItem.configTypeBool,
false
)

private fun addConfig(
k: String,
Expand Down
1 change: 1 addition & 0 deletions TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@
<string name="DisableDialogsFloatingButton">禁用主页浮动按钮</string>
<string name="DisableFlagSecure">Disable Flag Secure</string>
<string name="CenterActionBarTitle">标题居中</string>
<string name="ShowQuickReplyInBotCommands">在输入框中显示快速回复按钮</string>
</resources>
1 change: 1 addition & 0 deletions TMessagesProj/src/main/res/values/strings_na.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@
<string name="DisableDialogsFloatingButton">Disable Dialogs Floating Button</string>
<string name="DisableFlagSecure">Disable Flag Secure</string>
<string name="CenterActionBarTitle">Center title in action bar</string>
<string name="ShowQuickReplyInBotCommands">Show Quick Reply In Bot Commands</string>
</resources>

0 comments on commit 774ee4d

Please sign in to comment.