Skip to content

Commit

Permalink
* Make remembered limit per playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed Jan 23, 2024
1 parent 54160f6 commit f7d8f00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/views/Playlist/Playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default defineComponent({
this.getPlaylistInfoDebounce()
},
userPlaylistVisibleVideoLimit (val) {
sessionStorage.setItem('Playlist/userPlaylistVisibleVideoLimit', val)
sessionStorage.setItem(`Playlist/userPlaylistVisibleVideoLimit/${this.playlistId}`, val)

if (this.selectedUserPlaylistVideos.length < this.userPlaylistVisibleVideoLimit) {
this.playlistItems = this.selectedUserPlaylistVideos
Expand All @@ -162,7 +162,7 @@ export default defineComponent({
},
},
mounted: function () {
const limit = sessionStorage.getItem('Playlist/userPlaylistVisibleVideoLimit')
const limit = sessionStorage.getItem(`Playlist/userPlaylistVisibleVideoLimit/${this.playlistId}`)
if (limit !== null) {
this.userPlaylistVisibleVideoLimit = limit
}
Expand Down

0 comments on commit f7d8f00

Please sign in to comment.