From 8be649719152912ca54b4e479f4103e960c38499 Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Tue, 20 Jul 2021 00:17:05 -0400 Subject: [PATCH] Add some code to clear a "typing" message when there is no more text to send. --- Listener/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Listener/main.c b/Listener/main.c index a14d30b..f2ced13 100644 --- a/Listener/main.c +++ b/Listener/main.c @@ -406,7 +406,7 @@ void handleAwaitingMsgHeaderState(void) if (globals->messageHeader.messageArg) strcpy(globals->line2, " Listening..."); else - strcpy(globals->line2, ""); + globals->line2[0] = '\0'; InvalidateWindow(); break; @@ -442,8 +442,11 @@ void sendKey(void) if (textList->header.position < textList->header.size) return; - if (textList == globals->textListTail) + if (textList == globals->textListTail) { globals->textListTail = NULL; + globals->line3[0] = '\0'; + InvalidateWindow(); + } globals->textListHead = textList->header.next; free(textList);