walktalkchalk / TabStache

A chrome extension for saving and recalling tabs in a stash
GNU General Public License v2.0
2 stars 10 forks source link

Fixed adding empty stash #31

Closed ENiGMA9 closed 2 years ago

ENiGMA9 commented 6 years ago

This fixes #28, I see now someone else pulled faster but i'll pull this is just for the sake of it. So, at first I tried to make a tabs_valid function and use that to check if the logic from add_stash should be ran, but I hit the async wall, couldn't return something since the checking was done in the callback, so as a final move I moved the validation step with some flow control in the add_stash function, it's not pretty but gets the job done I guess, I meant to use a marker and show what's the problem but since there is no feedback message system in place I just skipped it, could be done better and if you have any suggestion to make it better please suggest, it just feels a bit wrong like now.

dngrhm commented 6 years ago

Thanks for the PR. I'll give it a look over soon. 👋