fix, fmt, refactor, document

This commit is contained in:
Moritz Ruth 2023-03-07 19:23:13 +01:00
parent 481da45e3d
commit a171f9ffed
Signed by: moritzruth
GPG key ID: C9BBAB79405EE56D
4 changed files with 4 additions and 2 deletions

View file

@ -12,7 +12,7 @@
- [x] CPU usage - [x] CPU usage
- [x] RAM usage - [x] RAM usage
- [x] Battery: level, charging status - [x] Battery: level, charging status
- [ ] Media session - [ ] Media control (MPRIS)
- [ ] PipeWire - [ ] PipeWire
- [ ] File watcher - [ ] File watcher

View file

@ -71,6 +71,7 @@ async fn main() -> Result<()> {
availability_topic, availability_topic,
discovery_device_object, discovery_device_object,
}, },
// dbus_session_connection: zbus::Connection::session().await.context("while connecting to the D-Bus session bus")?
}), }),
}; };

View file

@ -63,6 +63,7 @@ impl InitializationContext {
pub struct ModuleContext { pub struct ModuleContext {
pub config: super::config::Config, pub config: super::config::Config,
pub mqtt: ModuleContextMqtt, pub mqtt: ModuleContextMqtt,
// pub dbus_session_connection: zbus::Connection,
} }
impl ModuleContext { impl ModuleContext {

View file

@ -156,7 +156,7 @@ async fn handle_notification_message(context: Arc<ModuleContext>, message: Notif
} }
if let Some(encoded_image) = message.encoded_image { if let Some(encoded_image) = message.encoded_image {
let image_data = base64::engine::general_purpose::STANDARD_NO_PAD let image_data = base64::engine::general_purpose::STANDARD
.decode(encoded_image) .decode(encoded_image)
.context("while decoding the base64 image")?; .context("while decoding the base64 image")?;