MajMcCloud / TelegramBotFramework

This is a context based application framework for the C# TelegramBot library.
https://www.t.me/tgbotbase
MIT License
149 stars 43 forks source link

Keyboard Markup always is hided when navigate to next form on phone but not on desktop #30

Closed nightBaker closed 1 year ago

nightBaker commented 1 year ago

I use grid to show buttons as keyboard in AutoCleanForm.(If form is derived from FormBase everything is ok) On telegram desktop everything is ok, but on iphone when form is shown keyboard is hided.

ButtonGrid grid = new ButtonGrid(btns);

grid.KeyboardType = TelegramBotBase.Enums.eKeyboardType.ReplyKeyboard;
grid.Enabled = true;
grid.HideKeyboardOnCleanup = false;
grid.ResizeKeyboard = true;

AddControl(grid);
MajMcCloud commented 1 year ago

Hey @nightBaker That is probably an "only user" setting. So when you hide the ReplyKeyboard for one bot once with the button there, it will not show new ones on its own.

Hope this helped

PS: please check as well the OneTimeKeyboard setting

MajMcCloud commented 1 year ago

Hey @nightBaker,

did you have any news on this? Is this still relevant ? Can you provide an example project?

Thank you!

nightBaker commented 1 year ago

@MajMcCloud, I just change AutoCleanFormto FormBase and there is no problem with hided keyboard

MajMcCloud commented 1 year ago

@nightBaker

This will probably has something to do with the DeleteMode. Maybe check this, if it works setting it to OnLeavingForm.

So you are using the ReplyKeyboard, and this means when the message which belongs to that Keyboard "appearing" gets deleted, the keyboard disappears.

On Navigation to a new form all messages of the current form (with using AutoCleanForm) gots deleted, and controls gots cleaned up as well. So you have to sent that without a control to keep it "available".

It is a Telegram "thing".

MajMcCloud commented 1 year ago

I will close this issue now. Cause it would be probably a Client thing.