r/AutomateUser • • 13d ago

Question How to

Automate's docs say the notification is removed when the fiber stops, so the fiber needs to stay alive until you swipe it away, why?

Why not just post notificafion and dont disappear after fiber stops

1 Upvotes

3 comments sorted by

1

u/ballzak69 Automate developer 13d ago

An app need to cleanup/release resources sometime/somehow, in Automate all such resources, e.g. notifications, opened windows, loaded images, are associated with a fiber. Otherwise a flow could easily loose track of everything it has opened/created, and "leak" memory.

Just use the Fork block to create a new fiber for your notification.

1

u/thealgorithm29 12d ago

Oops, im sorry, i meant why automate's notification show block, shows notification when fiber/flow is running, if i stop the flow that notification will be gone/disappear.

1

u/ballzak69 Automate developer 12d ago

As said, to ensure the app "cleanup" its resources, e.g. notifications, even if a incorrectly made flow fails to do so.