Implement favorite paired devices (#72)
I need some assistance @pythops: where should we store the state, the favorited devices? Should it write itself into the users config?
@sermuns, you can use ~/.cache directory for that.
bluetui has dirs crate as dependency already, and you can get the cache directory easily
https://docs.rs/dirs/6.0.0/dirs/fn.cache_dir.html
Thanks, I will try that!
@sermuns, you can use ~/.cache directory for that.
Clearing cache shouldn't rather result in user's favourites disappearing.
It should rather go to $XDG_DATA_HOME (~/.local/share).
I agree with @Jorenar on this one
I have now had some time to try to implement this.
ec432f9 works, but I am not proud of this approach since it performs way too much I/O, reading from disk everytime the App::refresh is invoked.
I think I need to create a little in-memory state to "cache" the reading from disk, or am I overthinking this?
@sermuns maybe we should sync about it so we agree on the implementation. @eHammarstrom @Jorenar you are welcome to join if you want to. I have my Discord server https://discord.gg/mfSRc9Jann, so we can take the discussion there