Dispatcher: only notify once per profile#12866
Conversation
c22d00c to
5b80489
Compare
|
I've noticed there is a Notification:resetNotifySource() call on line 1202 that is inside the for loop which is probably related. Does anything need changing there to guarantee it gets called (if needed) or is the for-loop always guaranteed to have items to iterate? |
Good point. Since there's no other Or, well, this can be simplified to a single |
|
By which I mean, if there's only a single The whole bracketing thing is only necessary when there are multiple notify calls involved. koreader/frontend/ui/widget/notification.lua Line 162 in 604e5f3 |
Which, actually, there might be... inside whatever the dispatcher actions are going to be running. So, TL;DR: ignore most of my rambling, but, still, good point, I'd reset the notif source outside the loop, but after it. |
For example, when a profile (manual or auto triggered) has multiple actions? |
|
Closed in favor of #13078. Thanks. |
When notifications are enabled for a profile, a notification is currently triggered for each action that is enabled. Instead, only send one notification by moving outside of the for loop.
This change is