Show empty inbox after clearing

This commit is contained in:
m1ngsama 2026-05-31 20:04:22 +08:00
parent 7ff9474a5d
commit bacfe1ef4b
2 changed files with 4 additions and 0 deletions

View file

@ -385,9 +385,12 @@ void commands_dispatch(client_t *client) {
while (*inbox_arg == ' ') inbox_arg++;
if (strcmp(inbox_arg, "clear") == 0) {
clear_inbox(client);
output_kind = TNT_COMMAND_OUTPUT_INBOX;
buffer_appendf(output, sizeof(output), &pos, "%s",
i18n_text(client->ui_lang,
I18N_INBOX_CLEARED));
buffer_appendf(output, sizeof(output), &pos, "\n");
append_inbox_output(client, output, sizeof(output), &pos);
} else {
output_kind = TNT_COMMAND_OUTPUT_INBOX;
append_inbox_output(client, output, sizeof(output), &pos);

View file

@ -240,6 +240,7 @@ send -- ":"
expect ":"
send -- "inbox clear\r"
expect "私信已清空"
expect "(空)"
expect "q:关闭"
send -- "q"
expect "NORMAL"