Fix for Cleanup method

- there was an collection changed exception which blocked the method from working
This commit is contained in:
FlorianDahn 2021-03-04 15:17:06 +01:00
parent 1fd4752c0e
commit dc364b5fd3

View File

@ -142,8 +142,9 @@ namespace TelegramBotBase.Form
foreach(var m in msgs) foreach(var m in msgs)
{ {
Device.OnMessageDeleted(new MessageDeletedEventArgs(m)); Device.OnMessageDeleted(new MessageDeletedEventArgs(m));
this.OldMessages.Remove(m); }
}
this.OldMessages.RemoveRange(0, msgs.Count());
} }
} }
} }