File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 4040 */
4141 fileList : null ,
4242
43+ currentFileList : null ,
44+
4345 /**
4446 * Backbone model for storing files preferences
4547 */
112114 maxChunkSize : OC . appConfig . files && OC . appConfig . files . max_chunk_size
113115 }
114116 ) ;
117+ this . updateCurrentFileList ( this . fileList )
115118 this . files . initialize ( ) ;
116119
117120 // for backward compatibility, the global FileList will
160163 }
161164 } ,
162165
166+ /**
167+ * Set the currently active file list
168+ *
169+ * Due to the file list implementations being registered after clicking the
170+ * navigation item for the first time, OCA.Files.App is not aware of those until
171+ * they have initialized themselves. Therefore the files list needs to call this
172+ * method manually
173+ *
174+ * @param {OCA.Files.FileList } newFileList
175+ */
176+ updateCurrentFileList : function ( newFileList ) {
177+ this . currentFileList = newFileList ;
178+ } ,
179+
180+ /**
181+ * Return the currently active file list
182+ * @return {?OCA.Files.FileList }
183+ */
184+ getCurrentFileList : function ( ) {
185+ return this . currentFileList ;
186+ } ,
187+
163188 /**
164189 * Returns the container of the currently visible app.
165190 *
Original file line number Diff line number Diff line change 434434
435435 OC . Plugins . attach ( 'OCA.Files.FileList' , this ) ;
436436
437+ OCA . Files . App && OCA . Files . App . updateCurrentFileList ( this ) ;
438+
437439 this . initHeadersAndFooters ( )
438440 } ,
439441
738740 * Event handler when leaving previously hidden state
739741 */
740742 _onShow : function ( e ) {
743+ OCA . Files . App && OCA . Files . App . updateCurrentFileList ( this ) ;
741744 if ( this . shown ) {
742745 if ( e . itemId === this . id ) {
743746 this . _setCurrentDir ( '/' , false ) ;
You can’t perform that action at this time.
0 commit comments