From eff21ee2ce1fdb4328d71d801352ec25f4e457ff Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 2 Apr 2025 18:49:15 +0800 Subject: feat: ftxui (#17) * ready for merge rm sum random ocmments first and https://github.com/ArthurSonzogni/FTXUI/issues/1024 but still, ready for merge since we can't do anything on our end * style: clang-tidy * ci * ci * style: clang-tidy * fix * fix: scroll https://github.com/ArthurSonzogni/git-tui/blob/master/src/scroller.cpp * focus * update todo * style: clang-format * update todo * sticky scroll * update todxo * smol fix need event to update screen. so we just give event when IO updates * style: clang-format --------- Co-authored-by: github-actions[bot] --- src/chatServer.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/chatServer.cpp') diff --git a/src/chatServer.cpp b/src/chatServer.cpp index 56caf4b..7b64e79 100644 --- a/src/chatServer.cpp +++ b/src/chatServer.cpp @@ -1,9 +1,11 @@ #include "chatServer.hpp" +#include "IOManager.hpp" #include "chatManager.hpp" #include "commandHandler.hpp" #include "commands.hpp" #include "inputManager.hpp" #include "log.hpp" +#include "renderManager.hpp" #include "server.hpp" #include "sessionManager.hpp" @@ -28,18 +30,24 @@ void CChatServer::cleanup() { g_pServer.reset(); g_pCommandHandler.reset(); g_pInputManager.reset(); + g_pIOManager.reset(); + g_pRenderManager.reset(); } void CChatServer::initManagers() { log(LOG, "ChatServer: initializing managers"); + log(LOG, "Creating RenderManager"); + g_pRenderManager = std::make_unique(); + log(LOG, "Creating InputManager"); + g_pInputManager = std::make_unique(); log(LOG, "Creating Server"); g_pServer = std::make_unique(m_port); + log(LOG, "Creating IOManager"); + g_pIOManager = std::make_unique(); log(LOG, "Creating SessionManager"); g_pSessionManager = std::make_shared(); log(LOG, "Creating ChatManager"); g_pChatManager = std::make_unique(); - log(LOG, "Creating InputManager"); - g_pInputManager = std::make_unique(); } void CChatServer::start() { @@ -53,5 +61,5 @@ void CChatServer::start() { m_sessionManagerThread = std::jthread(&CSessionManager::run, g_pSessionManager.get()); m_sessionManagerThread.detach(); - g_pInputManager->run(); + g_pInputManager->inputLoop(); } -- cgit v1.2.3