imporve naming 2

This commit is contained in:
Alexander Zveruk 2020-05-03 20:59:40 +03:00
parent 426f3a0fa2
commit e4b1c15a58
2 changed files with 3 additions and 3 deletions

View file

@ -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':

View file

@ -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 []