feat: hide bot button in input field

Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
This commit is contained in:
Next Alone 2022-12-04 18:26:12 +08:00
parent c2010a138c
commit 0456dc014a
No known key found for this signature in database
GPG Key ID: DBA7B0AEF8C1CD2C
6 changed files with 12 additions and 2 deletions

View File

@ -7937,7 +7937,7 @@ public class ChatActivityEnterView extends BlurredFrameLayout implements Notific
botButton.setContentDescription(LocaleController.getString("AccDescrBotKeyboard", R.string.AccDescrBotKeyboard));
}
} else {
if (!canShowBotsMenu) {
if (!canShowBotsMenu && !NaConfig.INSTANCE.getHideBotButtonInInputField().Bool()) {
botButtonDrawable.setIcon(R.drawable.input_bot1, true);
botButton.setContentDescription(LocaleController.getString("AccDescrBotCommands", R.string.AccDescrBotCommands));
botButton.setVisibility(VISIBLE);
@ -7998,7 +7998,7 @@ public class ChatActivityEnterView extends BlurredFrameLayout implements Notific
return true;
}
} else {
if (!canShowBotsMenu) {
if (!canShowBotsMenu && !NaConfig.INSTANCE.getHideBotButtonInInputField().Bool()) {
botButtonDrawable.setIcon(R.drawable.input_bot1, true);
botButton.setContentDescription(LocaleController.getString("AccDescrBotCommands", R.string.AccDescrBotCommands));
return true;

View File

@ -137,6 +137,7 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
private final AbstractConfigCell showFullAboutRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getShowFullAbout()));
private final AbstractConfigCell hideMessageSeenTooltipcRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getHideMessageSeenTooltip()));
private final AbstractConfigCell typeMessageHintUseGroupNameRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getTypeMessageHintUseGroupName()));
private final AbstractConfigCell hideBotButtonInInputFieldRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getHideBotButtonInInputField()));
private final AbstractConfigCell dividerInteractions = cellGroup.appendCell(new ConfigCellDivider());
// Sticker

View File

@ -376,6 +376,12 @@ object NaConfig {
ConfigItem.configTypeBool,
false
)
val hideBotButtonInInputField =
addConfig(
"HideBotButtonInInputField",
ConfigItem.configTypeBool,
false
)
private fun addConfig(
k: String,

View File

@ -75,4 +75,5 @@
<string name="ShowFullAbout">直接显示完整的群组简介</string>
<string name="HideMessageSeenTooltip">隐藏消息已读提示</string>
<string name="TypeMessageHintUseGroupName">使用群组名称作为输入框提示</string>
<string name="HideBotButtonInInputField">隐藏输入框中的机器人按钮</string>
</resources>

View File

@ -44,4 +44,5 @@
<string name="DoActionsInCommonGroups">也在共同群組中操作</string>
<string name="HideMessageSeenTooltip">隱藏訊息已讀提示</string>
<string name="TypeMessageHintUseGroupName">使用群組名稱作為輸入提示</string>
<string name="HideBotButtonInInputField">隱藏輸入框中的機器人按鈕</string>
</resources>

View File

@ -76,4 +76,5 @@
<string name="ShowFullAbout">Show full about info</string>
<string name="HideMessageSeenTooltip">Hide message seen tooltip</string>
<string name="TypeMessageHintUseGroupName">Use group name as type message hint</string>
<string name="HideBotButtonInInputField">Hide bot button in input field</string>
</resources>