diff --git a/app/actions/fileLoader.js b/app/actions/fileLoader.js
index a07947354..a16777606 100644
--- a/app/actions/fileLoader.js
+++ b/app/actions/fileLoader.js
@@ -30,6 +30,11 @@ export function loadRootFolder() {
}
if (rootFolderPath === getState().fileLoader.rootFolderPath) {
+ // Reload the currently selected folder even if the root hasn't changed, the loadRootFolder
+ // function only gets called when entering the fileLoader component from the main menu and
+ // we want to support returning to the fileLoader from the main menu to update the files
+ // in the list
+ await changeFolderSelection(getState().fileLoader.selectedFolderFullPath)(dispatch, getState);
return;
}
@@ -183,9 +188,9 @@ export function setStatsGamePage(index) {
dispatch({
type: SET_STATS_GAME_PAGE,
payload: { statsGameIndex: statsGameIndex },
- })
+ });
gameProfileLoad(files[statsGameIndex].game)(dispatch);
- }
+ };
}
async function loadFilesInFolder(folderPath) {
@@ -230,7 +235,7 @@ async function loadFilesInFolder(folderPath) {
hasError = true;
}
- const startTime = timeUtils.fileToDateAndTime(game, fileName, fullPath)
+ const startTime = timeUtils.fileToDateAndTime(game, fileName, fullPath);
return {
fullPath: fullPath,
diff --git a/app/components/FileLoader.js b/app/components/FileLoader.js
index a45c6fada..506956b8e 100644
--- a/app/components/FileLoader.js
+++ b/app/components/FileLoader.js
@@ -53,9 +53,9 @@ export default class FileLoader extends Component {
componentDidMount() {
if (this.props.history.action === "PUSH") {
- // I don't really like this but when returning back to the file loader, the action is "POP"
- // instead of "PUSH", and we don't want to trigger the loader and ruin our ability to restore
- // scroll position when returning to fileLoader from a game
+ // The action when returning from the stats page is "POP". The action when coming from the
+ // main menu is "PUSH". When coming from the main menu, we want to reload the files such that
+ // any new files show up correctly
this.props.loadRootFolder();
}
}
diff --git a/app/components/FileRow.js b/app/components/FileRow.js
index 854df3958..bdb141b02 100644
--- a/app/components/FileRow.js
+++ b/app/components/FileRow.js
@@ -71,7 +71,7 @@ export default class FileRow extends Component {