diff --git a/tg/controllers/__init__.py b/tg/controllers/__init__.py index d140f13..71d50bf 100644 --- a/tg/controllers/__init__.py +++ b/tg/controllers/__init__.py @@ -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': diff --git a/tg/models/__init__.py b/tg/models/__init__.py index d3319b5..346e9cd 100644 --- a/tg/models/__init__.py +++ b/tg/models/__init__.py @@ -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 []