@@ -45,9 +45,9 @@ export default {
45
45
* @param dispatch
46
46
* @param term - search ter,
47
47
*/
48
- refreshDirectory ( { state, commit, dispatch } , term = null ) {
48
+ async refreshDirectory ( { state, commit, dispatch } , term = null ) {
49
49
let method = term == null ? 'content' : 'search'
50
- GET [ method ] ( state . selectedDisk , term ? term : state . selectedDirectory ) . then ( ( response ) => {
50
+ await GET [ method ] ( state . selectedDisk , term ? term : state . selectedDirectory ) . then ( ( response ) => {
51
51
commit ( 'resetSelected' ) ;
52
52
commit ( 'resetSortSettings' ) ;
53
53
commit ( 'resetHistory' ) ;
@@ -135,10 +135,11 @@ export default {
135
135
* TODO:: it makes sense to redo and simplify.
136
136
* @param state
137
137
* @param dispatch
138
+ * @param commit
138
139
* @param type
139
140
* @param path
140
141
*/
141
- selectMassByShift ( { state, dispatch } , { type, path} ) {
142
+ selectMassByShift ( { commit , state, dispatch } , { type, path} ) {
142
143
let selectedKey = state [ type ] . findIndex ( ( obj ) => obj . path === path ) ;
143
144
144
145
if ( state . selected [ type ] . length > 0 ) {
@@ -167,20 +168,20 @@ export default {
167
168
if ( newType == 'directories' ) {
168
169
state [ newType ] . forEach ( ( item , k ) => {
169
170
if ( alreadySelectedKey <= k )
170
- dispatch ( 'selectByState' , { commit , item} )
171
+ dispatch ( 'selectByState' , { item} )
171
172
} ) ;
172
173
state [ type ] . forEach ( ( item , k ) => {
173
174
if ( selectedKey >= k )
174
- dispatch ( 'selectByState' , { commit , item} )
175
+ dispatch ( 'selectByState' , { item} )
175
176
} ) ;
176
177
} else {
177
178
state [ newType ] . forEach ( ( item , k ) => {
178
179
if ( alreadySelectedKey >= k )
179
- dispatch ( 'selectByState' , { commit , item} )
180
+ dispatch ( 'selectByState' , { item} )
180
181
} ) ;
181
182
state [ type ] . forEach ( ( item , k ) => {
182
183
if ( selectedKey <= k )
183
- dispatch ( 'selectByState' , { commit , item} )
184
+ dispatch ( 'selectByState' , { item} )
184
185
} ) ;
185
186
}
186
187
}
0 commit comments