diff options
author | Vika <vika@fireburn.ru> | 2024-08-24 02:26:40 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-08-24 02:35:03 +0300 |
commit | a4ad4fdb8d56813871322bbc9673323218635b93 (patch) | |
tree | 037fcd6025fac4e963fb931017429ac04d5e3abf /src/main.rs | |
parent | c8f4b5240b8bcfb5b575bd12b09c68e96e15d37f (diff) | |
download | bowl-a4ad4fdb8d56813871322bbc9673323218635b93.tar.zst |
Very crude mock-up for an authentication screen
This saves memory by dropping unneeded components. Once the app changes state, it can simply drop the unnecessary component, such as the login screen, to save memory.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/main.rs b/src/main.rs index 31d7d24..a12fe60 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,3 @@ -use adw::prelude::GtkWindowExt; -use relm4::{ComponentParts, ComponentSender, RelmApp, Component, ComponentController}; - -use bowl::App; - -use bowl::APPLICATION_ID; - static GLIB_LOGGER: glib::GlibLogger = glib::GlibLogger::new( glib::GlibLoggerFormat::Plain, glib::GlibLoggerDomain::CrateTarget, @@ -14,11 +7,7 @@ fn main() { log::set_logger(&GLIB_LOGGER).unwrap(); log::set_max_level(log::LevelFilter::Debug); - let app = RelmApp::new(APPLICATION_ID); - app.run_async::<App>( - bowl::micropub::Client::new( - glib::Uri::parse(&std::env::var("MICROPUB_URI").unwrap(), glib::UriFlags::NONE).unwrap(), - std::env::var("MICROPUB_TOKEN").unwrap(), - ) - ); + let app = relm4::RelmApp::new(bowl::APPLICATION_ID); + + app.run_async::<bowl::App>(()); } |