mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 15:36:21 +00:00
Refactored chat session handling on sending message
This commit is contained in:
@@ -705,7 +705,9 @@ ui_close_connected_win(int index)
|
||||
otr_end_session(chatwin->barejid);
|
||||
}
|
||||
#endif
|
||||
chat_session_on_window_close(chatwin->barejid);
|
||||
if (chat_session_exists(chatwin->barejid)) {
|
||||
chat_session_on_window_close(chatwin->barejid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1162,7 +1164,9 @@ ui_prune_wins(void)
|
||||
if (window->type == WIN_CHAT) {
|
||||
if (conn_status == JABBER_CONNECTED) {
|
||||
ProfChatWin *chatwin = (ProfChatWin*)window;
|
||||
chat_session_on_window_close(chatwin->barejid);
|
||||
if (chat_session_exists(chatwin->barejid)) {
|
||||
chat_session_on_window_close(chatwin->barejid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -151,17 +151,11 @@ inp_get_char(char *input, int *size, int *result)
|
||||
in_command = TRUE;
|
||||
}
|
||||
|
||||
if (prefs_get_boolean(PREF_STATES)) {
|
||||
if (*result == ERR) {
|
||||
prof_handle_idle();
|
||||
}
|
||||
if (prefs_get_boolean(PREF_OUTTYPE)
|
||||
&& (*result != ERR)
|
||||
&& (*result != KEY_CODE_YES)
|
||||
&& !in_command
|
||||
&& _printable(ch)) {
|
||||
prof_handle_activity();
|
||||
}
|
||||
if (*result == ERR) {
|
||||
prof_handle_idle();
|
||||
}
|
||||
if ((*result != ERR) && (*result != KEY_CODE_YES) && !in_command && _printable(ch)) {
|
||||
prof_handle_activity();
|
||||
}
|
||||
|
||||
// if it wasn't an arrow key etc
|
||||
|
||||
Reference in New Issue
Block a user