From 09470e85ce0684d23b217ac113b8676bde602bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Fri, 8 Jul 2016 16:34:28 -0500 Subject: [PATCH] Remove a few bugs when users press enter in friend lists --- src/controller/buffers.py | 12 +++++++++--- src/controller/mainController.py | 4 ---- 2 files changed, 9 insertions(+), 7 deletions(-) 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()