FIX: new message loop will now correctly manage events and form switches
This commit is contained in:
parent
31e0683699
commit
72d94df907
@ -372,9 +372,7 @@ namespace TelegramBotBase
|
||||
}
|
||||
|
||||
//Action Event
|
||||
if (!ds.FormSwitched)
|
||||
{
|
||||
if (e.IsAction)
|
||||
if (!ds.FormSwitched && e.IsAction)
|
||||
{
|
||||
//Send Action event to controls
|
||||
await activeForm.ActionControls(e);
|
||||
@ -396,8 +394,11 @@ namespace TelegramBotBase
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!ds.FormSwitched)
|
||||
{
|
||||
//Render Event
|
||||
await activeForm.RenderControls(e);
|
||||
|
||||
@ -436,7 +437,7 @@ namespace TelegramBotBase
|
||||
|
||||
await Client_Loop(this, e);
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
DeviceSession ds = this.Sessions.GetSession(DeviceId);
|
||||
OnException(new SystemExceptionEventArgs(e.Message.Text, DeviceId, ds, ex));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user