diff options
author | Vika <vika@fireburn.ru> | 2024-08-20 18:31:43 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-08-20 18:31:43 +0300 |
commit | e6e4de9e15833e4042be5cd71944e9b8929346d4 (patch) | |
tree | 344e43e88c4a14d7fcc384df4a60431acfe03056 /src/main.rs | |
parent | d0353dbc6ac624f63240ec64b83d238499cb0c7c (diff) | |
download | bowl-e6e4de9e15833e4042be5cd71944e9b8929346d4.tar.zst |
Make the post composer asynchronous
This makes it able to execute unsendable futures, and unlocks ability for us to do asynchronous initialization and updates.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 4f4688e..acb9f66 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use relm4::{ComponentParts, ComponentSender, RelmApp, Component, ComponentContro use bowl::PostComposerModel; -const APPLICATION_ID: &str = "xyz.vikanezrimaya.kittybox.Bowl"; +use bowl::APPLICATION_ID; static GLIB_LOGGER: glib::GlibLogger = glib::GlibLogger::new( glib::GlibLoggerFormat::Plain, @@ -15,5 +15,10 @@ fn main() { log::set_max_level(log::LevelFilter::Debug); let app = RelmApp::new(APPLICATION_ID); - app.run::<PostComposerModel>( () ); + app.run_async::<PostComposerModel>( + bowl::micropub::Client::new( + glib::Uri::parse(&std::env::var("MICROPUB_URI").unwrap(), glib::UriFlags::NONE).unwrap(), + std::env::var("MICROPUB_TOKEN").unwrap(), + ) + ); } |