Skip to content

Commit

Permalink
adjust linux code
Browse files Browse the repository at this point in the history
  • Loading branch information
Misieq01 committed Dec 12, 2024
1 parent 18abb60 commit ad569f9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src-tauri/src/notification_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ impl NotificationManager {
match PlatformUtils::detect_current_os() {
CurrentOperatingSystem::Linux => {
#[cfg(target_os = "linux")]
let handle = notification.show().inspect_err(
|e| warn!(target: LOG_TARGET, "Failed to show notification: {:?}", e),
)?;
handle.on_close(|notification| {
info!(target: LOG_TARGET, "Notification closed: {:?}", notification);
});
{
let handle = notification.show().inspect_err(
|e| warn!(target: LOG_TARGET, "Failed to show notification: {:?}", e),
)?;
handle.on_close(|notification| {
info!(target: LOG_TARGET, "Notification closed: {:?}", notification);
});
}

Ok(())
}
CurrentOperatingSystem::MacOS => {
Expand Down

0 comments on commit ad569f9

Please sign in to comment.