diff --git a/changelog.md b/changelog.md index 67cfd6b..2d6bc30 100644 --- a/changelog.md +++ b/changelog.md @@ -15,7 +15,6 @@ * Fixed an error that was making socializer unable to render correctly certain Links containing uppercase letters (such as yandex.disk shared links). Before, those links were giving 404 errors when pressed, now they should work normally. This error was present in wall posts, comments, topics and chat messages. * Fixed an error related to chat notifications in Socializer. Before, the "online now" notification could break the Socializer interface, making it unable to load the chat in real time. * Fixed a small inconsistency when marking a conversation as read. Before, if two messages were sent by the recipient, only the last message was marked as read and the previous was making the unread sound all the time. Now that issue should be handled properly. -* Some errors, where buffers were not updated, should be handled better due to work in Socializer initialization function which should make the application slightly faster during boot. ### Changes diff --git a/src/controller/buffers.py b/src/controller/buffers.py index edb627c..8d17172 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -1511,9 +1511,6 @@ class peopleBuffer(feedBuffer): def update_online(self): online_users = self.session.vk.client.friends.getOnline() now = time.time() - # Attempt to fix a race condition in online buffers. - if self.session.db.get(self.name) == None: - self.session.db[self.name] = dict(items=[]) for i in self.session.db[self.name]["items"]: if i["id"] in online_users: i["last_seen"]["time"] = now diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 5bbfe3b..150e050 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -139,6 +139,8 @@ class Controller(object): pub.sendMessage("create_buffer", buffer_type="emptyBuffer", buffer_title=_("Chats"), kwargs=dict(parent=self.window.tb, name="chats")) pub.sendMessage("create_buffer", buffer_type="emptyBuffer", buffer_title=_("Timelines"), kwargs=dict(parent=self.window.tb, name="timelines")) wx.CallAfter(self.window.realize) + self.repeatedUpdate = RepeatingTimer(120, self.update_all_buffers) + self.repeatedUpdate.start() def complete_buffer_creation(self, buffer, name_, position): answer = buffer.get_items() @@ -250,8 +252,6 @@ class Controller(object): wx.CallAfter(self.window.change_status, _("Loading items for {0}").format(i.name,)) i.get_items() wx.CallAfter(self.window.change_status, _("Ready")) - self.repeatedUpdate = RepeatingTimer(120, self.update_all_buffers) - self.repeatedUpdate.start() def create_longpoll_thread(self, notify=False): try: