From 476fbea81b8897246ac6fe3b381ea2e39d02fa2e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 13 Oct 2020 13:12:31 +0200 Subject: actual encoding order.. --- app/client/modules/biggan/biggan.actions.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/client/modules/biggan/biggan.actions.js') diff --git a/app/client/modules/biggan/biggan.actions.js b/app/client/modules/biggan/biggan.actions.js index 10fd68a..e39c22c 100644 --- a/app/client/modules/biggan/biggan.actions.js +++ b/app/client/modules/biggan/biggan.actions.js @@ -201,8 +201,10 @@ export const load_encodings = () => dispatch => { // loading function }).then(res => { const [folders, files] = res + console.log('encodings: ', folders.length, 'folders, ', files.length, 'files') const folder_name_lookup = {} const encodings = {} + const encoding_order = [] folders.forEach(folder => { folder_name_lookup[folder.id] = folder.name encodings[folder.name] = [] @@ -214,11 +216,14 @@ export const load_encodings = () => dispatch => { folders.forEach(folder => { if (!encodings[folder.name].length) { delete encodings[folder.name] + } else { + encoding_order.push(folder.name) } }) dispatch({ type: types.biggan.load_encodings, - encodings + encodings, + encoding_order, }) }) } -- cgit v1.2.3-70-g09d2