Skip to content

Commit

Permalink
Merge pull request #686 from JakeStanger/fix/notifications
Browse files Browse the repository at this point in the history
fix(notifications): client broken by recent refactor
  • Loading branch information
JakeStanger authored Aug 4, 2024
2 parents 578293c + f819aec commit 92c690d
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 92c690d

Please sign in to comment.