mirror of
https://github.com/paul-nameless/tg
synced 2024-11-22 03:43:19 +00:00
imporve naming 2
This commit is contained in:
parent
426f3a0fa2
commit
e4b1c15a58
2 changed files with 3 additions and 3 deletions
|
@ -137,7 +137,7 @@ class Controller:
|
|||
def refresh_msgs(self):
|
||||
self.view.msgs.users = self.model.users
|
||||
msgs = self.model.fetch_msgs(limit=self.view.msgs.h)
|
||||
self.view.draw_msgs(self.model.get_current_msgs(), msgs)
|
||||
self.view.draw_msgs(self.model.get_current_chat_msg(), msgs)
|
||||
|
||||
def update_handler(self, update):
|
||||
try:
|
||||
|
@ -147,7 +147,7 @@ class Controller:
|
|||
# with self.lock:
|
||||
chat_id = update['message']['chat_id']
|
||||
self.model.msgs.msgs[chat_id].append(update['message'])
|
||||
# msgs = self.model.get_current_msgs()
|
||||
# msgs = self.model.get_current_chat_msg()
|
||||
self.refresh_msgs()
|
||||
if not update.get('disable_notification'):
|
||||
if update['message']['content'] == 'text':
|
||||
|
|
|
@ -23,7 +23,7 @@ class Model:
|
|||
return None
|
||||
return self.chats.chat_ids[self.current_chat]
|
||||
|
||||
def get_current_msgs(self):
|
||||
def get_current_chat_msg(self):
|
||||
chat_id = self.get_current_chat_id()
|
||||
if chat_id is None:
|
||||
return []
|
||||
|
|
Loading…
Reference in a new issue