17 lines
518 B
Python
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()
|