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

Why won't raise init and open events of forms with index less than 2? #23

Closed Samemantlt closed 2 years ago

Samemantlt commented 2 years ago

https://github.com/MajMcCloud/TelegramBotFramework/blob/b32347ff4fa5cfbd86f2e7cfd415499b2bcdfbab/TelegramBotBase/Form/Navigation/NavigationController.cs#L146-L147

MajMcCloud commented 2 years ago

The reason should be, as I'm remembering it, that due to the NavigateTo call to move to the NavigationController instance the init and open events should get called as well. So without this, you get them called twice.

Edit: As seen there is an empty constructor which you are maybe using, thats why you come up with this issue. I will make it private with the next update. So the first root form comes with the constructor and the second with the first call of PushAsync. So all new Pushes gets that Init and Opened call.

MajMcCloud commented 2 years ago

@Samemantlt

Hey! just wanna ask if you have some more details on this? Thanks!

MajMcCloud commented 2 years ago

Due to no activity, I'll close this one as well.