Closed m2acgi closed 1 year ago
This error message is shown when an infinite loop of shortcuts triggering shortcuts is detected. It is a protective measure to stop the app from becoming unresponsive or blocking the entire device. Thus, in the case of an actual infinite loop, the app is expected to show this message, meaning it's not necessarily a bug. @m2acgi Please provide more information on why you created this issue.
I use HTTP-Shortcuts to send files, each time a file is sent, a confirm box is poped to confirm whether to send the next one. Now, I can only send up to 6 files, and I get "maximum recursion depth reached" error. If have a option to disable this limit would be good because I know what I'm doing.
I see. I'll think about whether I can loosen this restriction a bit. The main purpose of this mechanism is to prevent infinite loops which would be difficult to stop, but in your case, since you have a dialog which you could just cancel, that is of no concern.
As a workaround, you can try by adding a delay of 500 milliseconds or more to the recursive call:
enqueueShortcut('my_shortcut', null, 500);
This will reset the recursion depth counter and should allow you to chain arbitrarily many shortcut executions.
Perfect