Show MUC history on intentional reconnect

Small bug caused by 13675fb and ce5a4ed.
Fix https://github.com/profanity-im/profanity/issues/1142
This commit is contained in:
Michael Vetter
2019-07-03 09:19:24 +02:00
parent 9f813445b7
commit ad9263520e
4 changed files with 42 additions and 7 deletions

View File

@@ -47,6 +47,8 @@
#include "omemo/omemo.h"
#endif
static gint _success_connections_counter = 0;
void
ev_disconnect_cleanup(void)
{
@@ -66,3 +68,32 @@ ev_disconnect_cleanup(void)
#endif
}
gboolean
ev_was_connected_already(void)
{
if (_success_connections_counter > 0)
return TRUE;
else
return FALSE;
}
gboolean
ev_is_first_connect(void)
{
if (_success_connections_counter == 1)
return TRUE;
else
return FALSE;
}
void
ev_inc_connection_counter(void)
{
_success_connections_counter++;
}
void
ev_reset_connection_counter(void)
{
_success_connections_counter = 0;
}