Skip to content

Commit 44d88a3

Browse files
authored
[UX] Initial refresh in the background if any library is ready (#3526)
Initial refresh in the background if any library is ready
1 parent 0fb4813 commit 44d88a3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/frontend/state/GlobalState.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ class GlobalState extends PureComponent<Props> {
749749

750750
async componentDidMount() {
751751
const { t } = this.props
752-
const { epic, gameUpdates = [], libraryStatus } = this.state
752+
const { epic, gog, amazon, gameUpdates = [], libraryStatus } = this.state
753753

754754
// Deals launching from protocol. Also checks if the game is already running
755755
window.api.handleLaunchGame(
@@ -864,7 +864,10 @@ class GlobalState extends PureComponent<Props> {
864864
if (legendaryUser || gogUser || amazonUser) {
865865
this.refreshLibrary({
866866
checkForUpdates: true,
867-
runInBackground: Boolean(epic.library?.length)
867+
runInBackground:
868+
epic.library.length !== 0 ||
869+
gog.library.length !== 0 ||
870+
amazon.library.length !== 0
868871
})
869872
}
870873

0 commit comments

Comments
 (0)