Closed bretbas closed 1 year ago
Use the notes below for custom serialization: https://github.com/MajMcCloud/TelegramBotFramework#istateform
Yes, but its problem, because in my Opened handler of some my forms, I added controls. And when deserialization in IStateForm i can restore this controls, BUT Opened handler invoked too Therefore i have 2 and more the same controls in the form...
why restore the full controls ? Just restore the MessageId of the control. And load it when Opened handler got invoked.
And how i can pass the MessageId to your CalendarPicker?
There is a MessageId property where you can set it. It is currently private but you can change the source to test it.
There is now a prerelease version which addresses the MessageId property. https://www.nuget.org/packages/TelegramBotBase/5.3.1-alpha
How can i serialize state of controls? For example CalendarPicker? I create autoclean messaged bot and when i restart the app i can't restore message of CalendarPicker for clean it