File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,12 +67,16 @@ class Search extends React.Component {
6767 items : clonedItems ,
6868 } ) ;
6969
70- //Add horizontalGrid BPM image for Non-Steam Games
70+ const downloadPromises = [ ] ;
71+
72+ downloadPromises . push ( Steam . addAsset ( location . state . assetType , game . appid , item . url ) ) ;
73+
74+ // Add horizontalGrid BPM image for Non-Steam Games
7175 if ( game . appidold && location . state . assetType == 'horizontalGrid' ) {
72- Steam . addAsset ( location . state . assetType , game . appidold , item . url ) ;
76+ downloadPromises . push ( Steam . addAsset ( location . state . assetType , game . appidold , item . url ) ) ;
7377 }
74-
75- Steam . addAsset ( location . state . assetType , game . appid , item . url ) . then ( ( ) => {
78+
79+ Promise . all ( downloadPromises ) . then ( ( ) => {
7680 clonedItems [ itemIndex ] . downloading = false ;
7781 this . setState ( {
7882 items : clonedItems ,
You can’t perform that action at this time.
0 commit comments