Fixing AutoCleanForm and NavigationController
- AutoCleanForm does not work properly inside a NavigationController (Some messages wont get deleted)
This commit is contained in:
parent
34890e35ac
commit
c0e67d6262
@ -134,6 +134,9 @@ namespace TelegramBotBase.Form.Navigation
|
||||
/// <returns></returns>
|
||||
public virtual async Task PushAsync(FormBase form, params object[] args)
|
||||
{
|
||||
//Leave current form (needed for AutoCleanForm to work properly)
|
||||
await CurrentForm.OnClosed(new EventArgs());
|
||||
|
||||
form.Client = this.Client;
|
||||
form.Device = this.Device;
|
||||
form.NavigationController = this;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user