@@ -103,24 +103,35 @@ import ProfileModList from '../../r2mm/mods/ProfileModList';
103
103
}
104
104
);
105
105
} catch (e ) {
106
+ store .commit (' download/updateDownload' , { assignId , failed: true });
106
107
return reject (e );
107
108
}
108
109
await ProfileModList .requestLock (async () => {
110
+ let currentDownloadIndex = 0 ;
109
111
for (const combo of downloadedMods ) {
110
112
try {
111
113
await DownloadModModal .installModAfterDownload (profile , combo .getMod (), combo .getVersion ());
112
114
} catch (e ) {
115
+ store .commit (' download/updateDownload' , { assignId , failed: true });
113
116
return reject (
114
117
R2Error .fromThrownValue (e , ` Failed to install mod [${combo .getMod ().getFullName ()}] ` )
115
118
);
116
119
}
120
+ store .commit (' download/updateDownload' , {
121
+ assignId ,
122
+ modName: combo .getMod ().getName (),
123
+ installProgress: ThunderstoreDownloaderProvider .instance .generateProgressPercentage (100 , currentDownloadIndex , downloadedMods .length )
124
+ });
125
+ currentDownloadIndex ++ ;
117
126
}
118
127
const modList = await ProfileModList .getModList (profile .asImmutableProfile ());
119
128
if (modList instanceof R2Error ) {
129
+ store .commit (' download/updateDownload' , { assignId , failed: true });
120
130
return reject (modList );
121
131
}
122
132
const err = await ConflictManagementProvider .instance .resolveConflicts (modList , profile .asImmutableProfile ());
123
133
if (err instanceof R2Error ) {
134
+ store .commit (' download/updateDownload' , { assignId , failed: true });
124
135
return reject (err );
125
136
}
126
137
return resolve ();
0 commit comments