feat: hide bot button in input field
Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
This commit is contained in:
parent
c2010a138c
commit
0456dc014a
@ -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;
|
||||
|
@ -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
|
||||
|
@ -376,6 +376,12 @@ object NaConfig {
|
||||
ConfigItem.configTypeBool,
|
||||
false
|
||||
)
|
||||
val hideBotButtonInInputField =
|
||||
addConfig(
|
||||
"HideBotButtonInInputField",
|
||||
ConfigItem.configTypeBool,
|
||||
false
|
||||
)
|
||||
|
||||
private fun addConfig(
|
||||
k: String,
|
||||
|
@ -75,4 +75,5 @@
|
||||
<string name="ShowFullAbout">直接显示完整的群组简介</string>
|
||||
<string name="HideMessageSeenTooltip">隐藏消息已读提示</string>
|
||||
<string name="TypeMessageHintUseGroupName">使用群组名称作为输入框提示</string>
|
||||
<string name="HideBotButtonInInputField">隐藏输入框中的机器人按钮</string>
|
||||
</resources>
|
||||
|
@ -44,4 +44,5 @@
|
||||
<string name="DoActionsInCommonGroups">也在共同群組中操作</string>
|
||||
<string name="HideMessageSeenTooltip">隱藏訊息已讀提示</string>
|
||||
<string name="TypeMessageHintUseGroupName">使用群組名稱作為輸入提示</string>
|
||||
<string name="HideBotButtonInInputField">隱藏輸入框中的機器人按鈕</string>
|
||||
</resources>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user