This repository has been archived on 2025-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
desktop_app/app/controllers/main_controller.py
2025-09-06 06:00:04 +03:00

17 lines
518 B
Python

from app.ui.views.login_view import LoginView
from app.ui.views.chat_list_view import ChatListView
class MainController:
def __init__(self):
self.login_view = None
self.chat_list_view = None
def show_login(self):
self.login_view = LoginView(on_login=self.handle_login_success)
self.login_view.show()
def handle_login_success(self, username):
self.login_view.close()
self.chat_list_view = ChatListView(username=username)
self.chat_list_view.show()