Skip to content

Conversation

mistermaxis
Copy link

@mistermaxis mistermaxis commented Aug 3, 2025

Closes #1265

Added example file for notify-rust examples:

  • Simple example
  • Simple example (async)
  • Minimal example
  • Example with actions (options)
  • Example with callback function on close
  • Example with callback function and reason (for closing the notification) message

@mistermaxis mistermaxis requested a review from marc2332 as a code owner August 3, 2025 19:11
Copy link
Owner

@marc2332 marc2332 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the CI is failing, maybe some methods are not available in MacOS?

use notify_rust::{Hint, Notification};

fn main() {
launch_with_props(app, "Router Example", (550.0, 400.0));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not your fault, I changed the name of this method yesterday :D

Suggested change
launch_with_props(app, "Router Example", (550.0, 400.0));
launch_with_params(app, "Router Example", (550.0, 400.0));

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I noticed that was changed after I made the PR hehe.

So, I'm not sure what's the best way to resolve this. At first I tried using #[cfg(target_os = ...)] rules like in the original notify-rust examples to include the problematic examples conditionally, but then errors with the formatting started showing up, so in the end I just removed all the examples that were Linux/Unix specific.

Now, there's an error on the Ubuntu build about a "blocking" module in the zbus crate. That, I don't know what to do about 😅

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I'm not sure what's the best way to resolve this. At first I tried using #[cfg(target_os = ...)] rules like in the original notify-rust examples to include the problematic examples conditionally, but then errors with the formatting started showing up, so in the end I just removed all the examples that were Linux/Unix specific.

I can have a look at this I test the PR properly, no worries

Now, there's an error on the Ubuntu build about a "blocking" module in the zbus crate. That, I don't know what to do about 😅

That's very weird, I will have a look at that too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Thank you so much. Let me know if there is anything I can help with.

@marc2332
Copy link
Owner

marc2332 commented Aug 9, 2025

@mistermaxis Seems like the CI is still failing 👀

@mistermaxis
Copy link
Author

@mistermaxis Seems like the CI is still failing 👀

Yes, I haven't been able to figure out how to remove these errors, which come from a different crate (zbus) and doesn't mention anything about any change in that module (blocking-api) in recent versions. Also, dependency versions are not something I'm all that familiar with. I will keep investigating, probably consult their community. At least now it fails on my machine too, so that should help me make progress more easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: Example on to send OS notifications using notify-rust
2 participants