Skip to content

Commit

Permalink
fixup! non-windows
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Nov 16, 2024
1 parent b4109eb commit 79cae51
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ use crate::{
};
use std::time::Instant;
use std::{error, fmt, marker::PhantomData, ops::Deref};

#[cfg(feature = "push-notifications")]
#[cfg(any(windows))]
use windows::Networking::PushNotifications::PushNotificationChannel;

/// Provides a way to retrieve events from the system and from the windows that were registered to
Expand Down
4 changes: 2 additions & 2 deletions src/platform/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,14 @@ pub trait PushNotificationsExtWindows {
return Err(1);
}
};
let push_channel_op = match mgr.CreatePushNotificationChannelForApplicationAsync() {
let register_op = match mgr.CreatePushNotificationChannelForApplicationAsync() {
Ok(channel) => channel,
Err(_) => {
return Err(2);
}
};
// Attach callback
attach_callback(push_channel_op, |result| match result {
attach_callback(register_op, |result| match result {
Ok(value) => register_push_channel(value),
Err(e) => println!("Operation failed with error: {:?}", e),
})
Expand Down
3 changes: 0 additions & 3 deletions src/platform_impl/windows/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,6 @@ impl<T> EventLoopWindowTarget<T> {
#[inline]
pub fn set_push_channel(&self, channel: Option<PushNotificationChannel>) {
*self.push_channel.lock() = channel;
self.runner_shared.owned_windows(|window| {
let _ = unsafe { SendMessageW(window, *CHANGE_THEME_MSG_ID, WPARAM(0), LPARAM(0)) };
});
}
}

Expand Down

0 comments on commit 79cae51

Please sign in to comment.