fix: Import + empty parameters
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit

This commit is contained in:
Loris Perret 2023-12-08 15:03:28 +01:00
parent 1ee4998ec6
commit 3b90387e10
2 changed files with 4 additions and 2 deletions

View File

@ -95,7 +95,7 @@ class AnalyticsGenerator {
result.append("import MatomoTracker") result.append("import MatomoTracker")
} }
if targets.contains(Analytics.TargetType.firebase) { if targets.contains(Analytics.TargetType.firebase) {
result.append("import Firebase") result.append("import FirebaseAnalytics")
} }
return result.joined(separator: "\n") return result.joined(separator: "\n")

View File

@ -103,10 +103,12 @@ class AnalyticsDefinition {
\(params.joined(separator: ",\n\t\t\t\t")) \(params.joined(separator: ",\n\t\t\t\t"))
] ]
""" """
} else { } else if params.count == 1 {
result = """ result = """
[\(params.joined(separator: ", "))] [\(params.joined(separator: ", "))]
""" """
} else {
result = "[:]"
} }
if type == .screen { if type == .screen {