File tree 2 files changed +10
-9
lines changed
2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -307,6 +307,7 @@ const state = {
307
307
defaultInvidiousInstance : '' ,
308
308
defaultVolume : 1 ,
309
309
uiScale : 100 ,
310
+ userPlaylistsSortBy : 'latest_played_first' ,
310
311
}
311
312
312
313
const sideEffectHandlers = {
Original file line number Diff line number Diff line change @@ -52,10 +52,18 @@ export default defineComponent({
52
52
query : '' ,
53
53
doSearchPlaylistsWithMatchingVideos : false ,
54
54
activeData : [ ] ,
55
- sortBy : SORT_BY_VALUES . LatestPlayedFirst ,
56
55
}
57
56
} ,
58
57
computed : {
58
+ sortBy : {
59
+ get ( ) {
60
+ return this . $store . getters . getUserPlaylistsSortBy
61
+ } ,
62
+ set ( value ) {
63
+ this . $store . dispatch ( 'updateUserPlaylistsSortBy' , value )
64
+ } ,
65
+ } ,
66
+
59
67
locale : function ( ) {
60
68
return this . $i18n . locale
61
69
} ,
@@ -180,9 +188,6 @@ export default defineComponent({
180
188
this . activeData = this . fullData
181
189
this . filterPlaylist ( )
182
190
} ,
183
- sortBy ( ) {
184
- sessionStorage . setItem ( 'UserPlaylists/sortBy' , this . sortBy )
185
- } ,
186
191
} ,
187
192
created : function ( ) {
188
193
document . addEventListener ( 'keydown' , this . keyboardShortcutHandler )
@@ -191,11 +196,6 @@ export default defineComponent({
191
196
this . dataLimit = limit
192
197
}
193
198
194
- const sortBy = sessionStorage . getItem ( 'UserPlaylists/sortBy' )
195
- if ( sortBy != null ) {
196
- this . sortBy = sortBy
197
- }
198
-
199
199
this . filterPlaylistDebounce = debounce ( this . filterPlaylist , 500 )
200
200
201
201
const oldQuery = this . $route . query . searchQueryText ?? ''
You can’t perform that action at this time.
0 commit comments