Remove a few bugs when users press enter in friend lists
This commit is contained in:
parent
bab896aba1
commit
09470e85ce
@ -426,11 +426,10 @@ class chatBuffer(baseBuffer):
|
|||||||
|
|
||||||
def onFocus(self, *args, **kwargs):
|
def onFocus(self, *args, **kwargs):
|
||||||
msg = self.session.db[self.name]["items"][-1]
|
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.reads.append(msg["id"])
|
||||||
self.session.db[self.name]["items"][-1]["read_state"] = 1
|
self.session.db[self.name]["items"][-1]["read_state"] = 1
|
||||||
|
|
||||||
|
|
||||||
def create_tab(self, parent):
|
def create_tab(self, parent):
|
||||||
self.tab = home.chatTab(parent)
|
self.tab = home.chatTab(parent)
|
||||||
|
|
||||||
@ -497,3 +496,10 @@ class peopleBuffer(feedBuffer):
|
|||||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.new_chat, menuitem=m.message)
|
widgetUtils.connect_event(m, widgetUtils.MENU, self.new_chat, menuitem=m.message)
|
||||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_timeline, menuitem=m.timeline)
|
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_timeline, menuitem=m.timeline)
|
||||||
return m
|
return m
|
||||||
|
|
||||||
|
def open_post(self, *args, **kwargs): pass
|
||||||
|
|
||||||
|
def play_audio(self, *args, **kwargs): pass
|
||||||
|
|
||||||
|
def pause_audio(self, *args, **kwargs): pass
|
||||||
|
|
||||||
|
@ -193,10 +193,6 @@ class Controller(object):
|
|||||||
|
|
||||||
def exit(self, *args, **kwargs):
|
def exit(self, *args, **kwargs):
|
||||||
log.debug("Receibed an exit signal. closing...")
|
log.debug("Receibed an exit signal. closing...")
|
||||||
try:
|
|
||||||
self.session.vk.client.account.setOffline()
|
|
||||||
except VkAuthError:
|
|
||||||
pass
|
|
||||||
self.disconnect_events()
|
self.disconnect_events()
|
||||||
self.window.Destroy()
|
self.window.Destroy()
|
||||||
wx.GetApp().ExitMainLoop()
|
wx.GetApp().ExitMainLoop()
|
||||||
|
Loading…
Reference in New Issue
Block a user