Closed rkodey closed 4 years ago
Something that came to mind which might make this slightly more complicated - how should automatically re-enabling isolation behave in case of Firefox shutdown/restart? Like, if I set the delay to 60seconds and just happen to close Firefox while it ticks down, it'll stay disabled after Firefox starts again. Maybe it might make sense to store the re-enable target time in storage (not preferences) and check that while initialization as well?
New commit should resolve all conversations above, and addresses the question of an interrupted countdown if the browser is closed. Using the local storage was rather seamless, thanks to your storage class!
I think there's a good argument to move the isolation.active
out of preferences. My thought is that it's not really a preference as it cannot be toggled from the Preferences / Options page. It's more of a pseudo-pref that's only in the popup. I think I can cleanly pull it out of prefs and into the new local storage I added to resume the auto-re-isolate. That might also resolve #433.
New commit.
NOTE: Somehow something changed on my setup, and a build error popped up in test/helper.ts
. It feels like some library got updated, but even after fully rebuilding my local node_packages, I'm still getting it. I fixed the error to allow my local build to proceed - but I did not commit the change it since I'm not sure where the underlying change came from.
I fixed the error to allow my local build to proceed
What kind of error did you encounter?
I fixed the error to allow my local build to proceed
What kind of error did you encounter?
You can disregard. Now that I'm caught up on the main branch, the head is compiling clean.
Thanks for the merge!
I will work on refactoring the isolation active flag in a new PR related to #433
Add handler logic in isolation.ts Add a new function setIsolation, to consolidate some overlapping code Replace code in commands.ts with setIsolation function Update addIsolationInactiveBadge in browseraction.ts to accept an optional counter Closes #315