diff options
author | Eion Robb <eion@robbmob.com> | 2015-08-25 00:56:26 +0300 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2015-08-25 00:56:26 +0300 |
commit | 8fbede83cf41817554f304ffff4634d7b6cd4799 (patch) | |
tree | b25d2777939cccbd66623ad94ec30f2edc0fed47 | |
parent | d82ca98e938e5138800b8a7f97e70c50af19ecc9 (diff) |
Improve offline history support by not repeating history if we haven't received a message in the current session
-rw-r--r-- | steam-mobile/libsteam.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/steam-mobile/libsteam.c b/steam-mobile/libsteam.c index ac04e3d..f2a4fa8 100644 --- a/steam-mobile/libsteam.c +++ b/steam-mobile/libsteam.c @@ -890,6 +890,8 @@ steam_get_offline_history_cb(SteamAccount *sa, JsonObject *obj, gpointer user_da } else {
serv_got_im(sa->pc, who, text, PURPLE_MESSAGE_RECV, timestamp);
}
+
+ sa->last_message_timestamp = timestamp;
}
g_free(who);
@@ -1418,6 +1420,9 @@ static void steam_close(PurpleConnection *pc) purple_timeout_remove(sa->poll_timeout);
purple_timeout_remove(sa->watchdog_timeout);
+ if (sa->last_message_timestamp > 0)
+ purple_account_set_int(sa->account, "last_message_timestamp", sa->last_message_timestamp);
+
purple_debug_info("steam", "destroying %d waiting connections\n",
g_queue_get_length(sa->waiting_conns));
|