Add update download reason to analytics (#6023)

* Add  download reason to analytics

* mark modpack updates as actual updates in analytics

* fmt
This commit is contained in:
aecsocket
2026-05-07 13:07:20 +00:00
committed by GitHub
parent 56dae8f104
commit e8dc3c3150
10 changed files with 30 additions and 14 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ export const isVersionCompatible = (version, project, instance) => {
)
}
export const installVersionDependencies = async (profile, version, onDepInstalling) => {
export const installVersionDependencies = async (profile, version, reason, onDepInstalling) => {
const projectNames = new Map()
const storeProjectName = (p) => {
if (p?.id && p.title) projectNames.set(p.id, p.title)
@@ -177,7 +177,7 @@ export const installVersionDependencies = async (profile, version, onDepInstalli
const batch = queuedInstalls.slice(i, i + batchSize)
await Promise.all(
batch.map(async ({ versionId }) => {
await add_project_from_version(profile.path, versionId, 'dependency')
await add_project_from_version(profile.path, versionId, reason)
}),
)
}