Fix SubGHz chat immediately closing #1440

It's just an if condition which should've been inverted

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Ruben van Baarle 2022-07-25 13:48:06 +02:00 committed by GitHub
parent c22d66590e
commit 3ee592cae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -676,7 +676,7 @@ static void subghz_cli_command_chat(Cli* cli, string_t args) {
break; break;
} }
} }
if(cli_is_connected(cli)) { if(!cli_is_connected(cli)) {
printf("\r\n"); printf("\r\n");
chat_event.event = SubGhzChatEventUserExit; chat_event.event = SubGhzChatEventUserExit;
subghz_chat_worker_put_event_chat(subghz_chat, &chat_event); subghz_chat_worker_put_event_chat(subghz_chat, &chat_event);