Creating DeviceSession and other stuff slight earlier in the LoadSessionStates methods
This commit is contained in:
parent
e88114049e
commit
be2660239a
@ -208,6 +208,13 @@ namespace TelegramBotBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
form.Client = Client;
|
||||||
|
var device = new DeviceSession(s.DeviceId, form);
|
||||||
|
|
||||||
|
device.ChatTitle = s.ChatTitle;
|
||||||
|
|
||||||
|
this.SessionList.Add(s.DeviceId, device);
|
||||||
|
|
||||||
//Is Subclass of IStateForm
|
//Is Subclass of IStateForm
|
||||||
var iform = form as IStateForm;
|
var iform = form as IStateForm;
|
||||||
if (iform != null)
|
if (iform != null)
|
||||||
@ -217,14 +224,6 @@ namespace TelegramBotBase
|
|||||||
iform.LoadState(ls);
|
iform.LoadState(ls);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
form.Client = Client;
|
|
||||||
var device = new DeviceSession(s.DeviceId, form);
|
|
||||||
|
|
||||||
device.ChatTitle = s.ChatTitle;
|
|
||||||
|
|
||||||
this.SessionList.Add(s.DeviceId, device);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await form.OnInit(new InitEventArgs());
|
await form.OnInit(new InitEventArgs());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user