Load all chats during startup
This commit is contained in:
parent
d6a87bc426
commit
1db4e10dc8
@ -6,7 +6,8 @@
|
||||
* Fixed an error in Socializer that was making it unable to detect unread messages properly.
|
||||
* Socializer should save all tracebacks directly to error.log instead of displaying an error message during exit. ([#27,](https://code.manuelcortez.net/manuelcortez/socializer/issues/27))
|
||||
* When displaying user profiles, fixed an error where a married person without specifing relation partner would cause an error in the program. ([#29,](https://code.manuelcortez.net/manuelcortez/socializer/issues/29))
|
||||
* Added new global keystrokes, available in the main window of Socializer.
|
||||
* Socializer will load all conversations during startup, not only conversations with unread messages.
|
||||
* Added new global keystrokes, available in the main window.
|
||||
* Alt + up/down arrows: Increase / decrease volume.
|
||||
* Alt + Left/down arrows: Play previous and next song if playing an audios buffer.
|
||||
* Control + P: Play/pause.
|
||||
|
@ -1,6 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
from builtins import range
|
||||
import time
|
||||
import os
|
||||
import webbrowser
|
||||
@ -459,12 +457,13 @@ class Controller(object):
|
||||
return
|
||||
try:
|
||||
log.debug("Getting possible unread messages.")
|
||||
msgs = self.session.vk.client.messages.getDialogs(count=200, unread=True)
|
||||
msgs = self.session.vk.client.messages.getConversations(count=200)
|
||||
except VkApiError as ex:
|
||||
if ex.code == 6:
|
||||
log.exception("Something went wrong when getting messages. Waiting a second to retry")
|
||||
for i in msgs["items"]:
|
||||
call_threaded(self.chat_from_id, i["message"]["user_id"], setfocus=False, unread=True)
|
||||
call_threaded(self.chat_from_id, i["last_message"]["peer_id"], setfocus=False, unread=False)
|
||||
time.sleep(0.6)
|
||||
|
||||
def mark_as_read(self):
|
||||
for i in self.buffers:
|
||||
|
Loading…
Reference in New Issue
Block a user