format: paket.paket

This commit is contained in:
jane400 2024-09-17 19:26:23 +02:00 committed by jane400
parent 0dc60250e6
commit e2ff1594f8

View file

@ -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::<App>(());
}