Closed thewizzy closed 7 months ago
Great idea, i made it fairly generic so we can use it in other places if we need. It doesn't fit with sidebar resize as it needs to know drag beginning and end anyway, so we can just save when we hit the end.
The latest commit changes it to using a call counter of type u64 which is guarded by arc/rwlock to allow it to be cloned and put into a bunch of closures without issues. I tried implementing with an Atomicu64 but there were issues particularly when trying to get the value access inside the closure exec_after. Can wrap it in an arc outside of this, maybe need to wrap it inside too.
The latest commit changes it to using a call counter of type u64 which is guarded by arc/rwlock to allow it to be cloned and put into a bunch of closures without issues. I tried implementing with an Atomicu64 but there were issues particularly when trying to get the value access inside the closure exec_after. Can wrap it in an arc outside of this, maybe need to wrap it inside too.
Writing this comment made me think of a way we might be able to do it. 1201d74 is an AtomicU64 version.
Save the window size on exit.
Should we remove the logic to save the slider until window closed too?