This PR moves the request for the PC version into the initial load happening before booting the app. This is due to the fact that the rest of the app behaves as if the version is always present, and could crash if the version is not there for some reason.
This also fixes a crash happening whenever the get_version call takes too much time to respond, causing the code accessing the version to crash unexpectedly. In order to reproduce, simply add a timeout in the GetVersion command
Changes
refactor GetVersion to an async function
remove major, minor and patch values from the store, since they are never accessed
call GetVersion in useLoadingState
remove GetVersion call from the LoadInitialState
How Has This Been Tested?
manually, by verifying the crash does not happen anymore
Description
This PR moves the request for the PC version into the initial load happening before booting the app. This is due to the fact that the rest of the app behaves as if the version is always present, and could crash if the version is not there for some reason.
This also fixes a crash happening whenever the
get_version
call takes too much time to respond, causing the code accessing the version to crash unexpectedly. In order to reproduce, simply add a timeout in theGetVersion
commandChanges
GetVersion
to an async functionGetVersion
inuseLoadingState
GetVersion
call from theLoadInitialState
How Has This Been Tested?
PR Quality Checklist
react-i18next
library (useTranslation hook and/or Trans component), see an example herenpm run build
builds without any errorIn order to increase the likelihood of your contribution being accepted, please make sure you have read both the Contributing Guidelines and the Project Guidelines
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.