feat: make global state simpler

This commit is contained in:
2025-02-10 20:05:03 +07:00
parent bfc9588738
commit 1bb9729e75
10 changed files with 211 additions and 147 deletions

View File

@@ -1,4 +1,3 @@
use app_state::registry::AppRegistry;
use asset::Assets;
use async_utility::task::spawn;
use chat_state::registry::ChatRegistry;
@@ -215,8 +214,6 @@ fn main() {
.with_assets(Assets)
.with_http_client(Arc::new(reqwest_client::ReqwestClient::new()))
.run(move |cx| {
// Initialize app global state
AppRegistry::set_global(cx);
// Initialize chat global state
ChatRegistry::set_global(cx);