rosulek / gmail-tickler

Get emails out of your inbox until a specified date
MIT License
19 stars 5 forks source link

Loop over labels 2x to restore just-tickled threads #23

Closed lehrblogger closed 7 years ago

lehrblogger commented 7 years ago

Otherwise, threads that were converted from a command to a tickle label by the current execution of the script won't also get restored if it's within the appropriate time window.

This isn't a particularly elegant solution, but minimizes complexity added elsewhere. It does mean the script calls GmailApp.getUserLabels() an extra time on every execution, and also lbl.getThreads() for each label matching TICKLE.label_prefix, but I'm inclined to address performance issues once they occur with the new implementation.