diff --git a/src/controller/buffers.py b/src/controller/buffers.py index 399c6ea..b36ae3f 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -426,11 +426,10 @@ class chatBuffer(baseBuffer): def onFocus(self, *args, **kwargs): msg = self.session.db[self.name]["items"][-1] - if msg["read_state"] == 0 and msg["id"] not in self.reads: + if msg.has_key("read_state") and msg["read_state"] == 0 and msg["id"] not in self.reads: self.reads.append(msg["id"]) self.session.db[self.name]["items"][-1]["read_state"] = 1 - def create_tab(self, parent): self.tab = home.chatTab(parent) @@ -496,4 +495,11 @@ class peopleBuffer(feedBuffer): m = menus.peopleMenu() widgetUtils.connect_event(m, widgetUtils.MENU, self.new_chat, menuitem=m.message) widgetUtils.connect_event(m, widgetUtils.MENU, self.open_timeline, menuitem=m.timeline) - return m \ No newline at end of file + return m + + def open_post(self, *args, **kwargs): pass + + def play_audio(self, *args, **kwargs): pass + + def pause_audio(self, *args, **kwargs): pass + diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 0255ec6..3e410dd 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -193,10 +193,6 @@ class Controller(object): def exit(self, *args, **kwargs): log.debug("Receibed an exit signal. closing...") - try: - self.session.vk.client.account.setOffline() - except VkAuthError: - pass self.disconnect_events() self.window.Destroy() wx.GetApp().ExitMainLoop()