Fix #5008 : Remember Playlist "Sort By" Selection Between Sessions
Pull Request Type
- [ ] Bugfix
- [x] Feature Implementation
- [ ] Documentation
- [ ] Other
Related issue
closes #5008
Description
This pull request implements the ability to remember the "Sort By" selection for playlists between sessions.
Previously, sorting preferences were not retained after restarting the application.
To ensure persistence, I used localStorage instead of sessionStorage, so the selected sorting option remains even after restarting FreeTube.
Desktop
- OS: Windows 11
- OS Version: 24H2 (OS Build 26100.3476)
- FreeTube version: 0.23.2
Additional context
This feature improves user experience by keeping sorting preferences saved permanently, rather than resetting after each session.
Hi @efb4f5ff-1298-471a-8973-3d47447115dc , Please Review . Thanks!
This should be in a store rather than localStorage.
@MarmadileManteater Thank you for feedback! I noticed your suggestion to store the data in a more appropriate place instead of localStorage. Would it be better to store this data in a database?
Yes, it should be in one of the stores. FreeTube uses nedb to store its persistent data. https://github.com/FreeTubeApp/FreeTube/tree/development/src/renderer/store/modules
Hi @efb4f5ff-1298-471a-8973-3d47447115dc @MarmadileManteater , Please Review . Thanks!