Skip to content

Commit

Permalink
fix(notifications): client broken by recent refactor
Browse files Browse the repository at this point in the history
Fixes #674
  • Loading branch information
JakeStanger committed Aug 4, 2024
1 parent 578293c commit f819aec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/clients/swaync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@ use zbus::export::ordered_stream::OrderedStreamExt;
use zbus::zvariant::Type;

#[derive(Debug, Clone, Copy, Type, Deserialize)]
#[allow(dead_code)]
pub struct Event {
pub count: u32,
pub dnd: bool,
pub cc_open: bool,
// pub inhibited: bool,
pub inhibited: bool,
}

type GetSubscribeData = (bool, bool, u32, bool);

/// Converts the data returned from
/// `get_subscribe_data` into an event for convenience.
impl From<GetSubscribeData> for Event {
fn from((dnd, cc_open, count, _inhibited): (bool, bool, u32, bool)) -> Self {
fn from((dnd, cc_open, count, inhibited): (bool, bool, u32, bool)) -> Self {
Self {
count,
dnd,
cc_open,
// inhibited,
inhibited,
}
}
}
Expand Down

0 comments on commit f819aec

Please sign in to comment.