From e2ff1594f83a7c9a6263ad8e66a848bec5c962e6 Mon Sep 17 00:00:00 2001 From: jane400 Date: Tue, 17 Sep 2024 19:26:23 +0200 Subject: [PATCH] format: paket.paket --- paket/src/bin/paket.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/paket/src/bin/paket.rs b/paket/src/bin/paket.rs index c385069..e14185c 100644 --- a/paket/src/bin/paket.rs +++ b/paket/src/bin/paket.rs @@ -1,15 +1,8 @@ -use std::sync::Arc; - +use adw::{self, glib, prelude::*}; +use gtk; use paket::login::{new_login_shared_state, Login, LoginOutput}; use paket::ready::{Ready, ReadyOutput}; -use relm4::{ - RELM_THREADS, - adw, gtk, main_adw_application, prelude::*, tokio::sync::Mutex, - AsyncComponentSender, SharedState, -}; -use gtk::prelude::*; -use adw::{glib, prelude::*}; - +use relm4::{main_adw_application, prelude::*, AsyncComponentSender, RELM_THREADS}; #[derive(Debug, PartialEq)] enum AppState { @@ -241,7 +234,13 @@ impl AsyncComponent for App { } AppInput::FatalErrorOccoured(error) => { widgets.fatal_status_page.set_title(&error.short); - widgets.fatal_status_page.set_description(Some(format!("{}\nThis error is fatal, the app can't continue.", &error.long).as_str())); + widgets.fatal_status_page.set_description(Some( + format!( + "{}\nThis error is fatal, the app can't continue.", + &error.long + ) + .as_str(), + )); self.set_state(AppState::FatalError); } AppInput::SwitchToReady => { @@ -292,6 +291,8 @@ fn main() { theme.add_resource_path("/de/j4ne/Paket/icons/"); theme.add_resource_path("/de/j4ne/Paket/scalable/actions/"); relm4_icons::initialize_icons(); + let app = RelmApp::new(paket::constants::APP_ID); + app.run_async::(()); }