Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e29652148 | ||
|
|
5bb316d874 | ||
|
|
d2ae08771e |
@@ -170,10 +170,8 @@ public class StartForm : FormBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Gets invoked during Navigation to this form
|
//Gets invoked during Navigation to this form
|
||||||
public override async Task Init(params object[] param)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
//Init() got replaced with event handler
|
||||||
|
|
||||||
//Opened() got replaced with event handler
|
//Opened() got replaced with event handler
|
||||||
|
|
||||||
|
|||||||
@@ -149,9 +149,16 @@ namespace TelegramBotBase.Form
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
parallelQuery.ForAll(i =>
|
parallelQuery.ForAll(i =>
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
Device.DeleteMessage(i).GetAwaiter().GetResult();
|
Device.DeleteMessage(i).GetAwaiter().GetResult();
|
||||||
deletedMessages.Add(i);
|
deletedMessages.Add(i);
|
||||||
|
}
|
||||||
|
catch (ApiRequestException req) when (req.ErrorCode == 400)
|
||||||
|
{
|
||||||
|
deletedMessages.Add(i);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (AggregateException ex)
|
catch (AggregateException ex)
|
||||||
@@ -182,9 +189,16 @@ namespace TelegramBotBase.Form
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
parallelQuery.ForAll(i =>
|
parallelQuery.ForAll(i =>
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
Device.DeleteMessage(i).GetAwaiter().GetResult();
|
Device.DeleteMessage(i).GetAwaiter().GetResult();
|
||||||
deletedMessages.Add(i);
|
deletedMessages.Add(i);
|
||||||
|
}
|
||||||
|
catch (ApiRequestException req) when (req.ErrorCode == 400)
|
||||||
|
{
|
||||||
|
deletedMessages.Add(i);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (AggregateException ex)
|
catch (AggregateException ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user