Bugfix: Don't say we're late if we aren't

This commit is contained in:
Starbeamrainbowlabs 2019-05-08 15:44:46 +01:00
parent 3d4af3eb2f
commit 3b072f3e97
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 2 additions and 2 deletions

View File

@ -345,7 +345,7 @@ namespace RhinoReminds
while (true) {
nextReminder = reminderList.GetNextReminder();
// Wait for the next reminder
TimeSpan nextWaitingTime;
TimeSpan nextWaitingTime = new TimeSpan();
try {
if (nextReminder != null) {
nextWaitingTime = nextReminder.Time - DateTime.Now;
@ -383,7 +383,7 @@ namespace RhinoReminds
Jid targetJid = nextReminder.Jid; // Apparently nextReminder is null after the sendAndDeleteReminder() call - very odd!
sendAndDeleteReminder(nextReminder);
if (nextWaitingTime.TotalMilliseconds < -1) {
if (nextWaitingTime.TotalMilliseconds < -1 * 2000) {
client.SendChatMessage(
targetJid,
"(Sorry I'm late reminding you! I might not have been running at the time, " +