Remove delays

This commit is contained in:
Zotan 2018-03-29 14:25:07 +02:00
parent 9937575651
commit 3be59e8f67

View file

@ -1,5 +1,4 @@
using using System;
System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@ -63,7 +62,7 @@ namespace TelegramRemindMe
{ {
case ChatStatusEnum.WaitingTaskTitle: case ChatStatusEnum.WaitingTaskTitle:
currentChat._tasklist.Add(new TaskEntry(message.Text)); currentChat._tasklist.Add(new TaskEntry(message.Text));
await Bot.SendChatActionAsync(message.Chat.Id, ChatAction.Typing); //await Bot.SendChatActionAsync(message.Chat.Id, ChatAction.Typing);
SendOverview(currentChat, "Task added successfully!"); SendOverview(currentChat, "Task added successfully!");
return; return;
case ChatStatusEnum.WaitingTaskComplete: case ChatStatusEnum.WaitingTaskComplete:
@ -199,7 +198,7 @@ namespace TelegramRemindMe
} }
}); });
await Bot.SendChatActionAsync(chat.ChatId, ChatAction.Typing); //await Bot.SendChatActionAsync(chat.ChatId, ChatAction.Typing);
//TODO: why is this firing when workingmsg already deleted? //TODO: why is this firing when workingmsg already deleted?
try try
@ -242,13 +241,13 @@ namespace TelegramRemindMe
prefixLine) prefixLine)
.Result.MessageId; .Result.MessageId;
await Bot.SendChatActionAsync(chat.ChatId, ChatAction.Typing); //await Bot.SendChatActionAsync(chat.ChatId, ChatAction.Typing);
await Task.Delay(1500); //await Task.Delay(1500);
await Bot.EditMessageTextAsync(chat.ChatId, msgid, sb.ToString(), replyMarkup: actionKeyboard); await Bot.EditMessageTextAsync(chat.ChatId, msgid, sb.ToString(), replyMarkup: actionKeyboard);
} }
else else
{ {
await Bot.SendChatActionAsync(chat.ChatId, ChatAction.Typing); //await Bot.SendChatActionAsync(chat.ChatId, ChatAction.Typing);
await Bot.SendTextMessageAsync(chat.ChatId, sb.ToString(), replyMarkup: actionKeyboard); await Bot.SendTextMessageAsync(chat.ChatId, sb.ToString(), replyMarkup: actionKeyboard);
} }
} }