1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 16:16:46 +02:00

fix window related bugs and warn user when max window limit has been reached

This commit is contained in:
Jfreegman
2013-11-30 05:35:25 -05:00
parent 8ff907d719
commit f6a6aecaf5
8 changed files with 101 additions and 39 deletions

View File

@ -246,11 +246,6 @@ static void chat_onGroupInvite(ToxWindow *self, Tox *m, int friendnumber, uint8_
wprintw(ctx->history, "%s has invited you to a group chat.\n", name);
if (num_groupchats >= MAX_GROUPCHAT_NUM) {
wprintw(ctx->history, "Maximum number of group chats has been reached. Discarding invite.\n");
return;
}
memcpy(friends[friendnumber].pending_groupchat, group_pub_key, TOX_CLIENT_ID_SIZE);
wprintw(ctx->history, "Type \"/join\" to join the chat.\n");
alert_window(self, WINDOW_ALERT_2, true);
@ -477,6 +472,8 @@ ToxWindow new_chat(Tox *m, int friendnum)
ToxWindow ret;
memset(&ret, 0, sizeof(ret));
ret.active = true;
ret.onKey = &chat_onKey;
ret.onDraw = &chat_onDraw;
ret.onInit = &chat_onInit;