Skip to content

Commit c58e06f

Browse files
authored
Merge pull request #3767 from mrixner/update-comment-clarity
2 parents 12397b9 + 9dd9b5e commit c58e06f

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

  • src/UniGetUI.PackageEngine.PackageManagerClasses/Packages

src/UniGetUI.PackageEngine.PackageManagerClasses/Packages/Package.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,15 @@ private static string GenerateIconId(Package p)
328328
{
329329
"Steam" => p.Id.ToLower().Split("\\")[^1].Replace("steam app ", "steam-").Trim(),
330330
"Local PC" => p.Id.Split("\\")[^1],
331-
"Microsoft Store" => p.Id.IndexOf('_') < p.Id.IndexOf('.')
332-
? // If the first underscore is before the period, this ID has no publisher
333-
string.Join('_', p.Id.Split("\\")[1].Split("_")[0..^4])
334-
: // no publisher: remove `MSIX\`, then the standard ending _version_arch__{random p.Id}
331+
// If the first underscore is before the period, this ID has no publisher
332+
"Microsoft Store" => p.Id.IndexOf('_') < p.Id.IndexOf('.') ?
333+
// no publisher: remove `MSIX\`, then the standard ending _version_arch__{random p.Id}
334+
string.Join('_', p.Id.Split("\\")[1].Split("_")[0..^4]) :
335+
// remove the publisher (before the first .), then the standard _version_arch__{random p.Id}
335336
string.Join('_',
336337
string.Join('.', p.Id.Split(".")[1..])
337338
.Split("_")
338-
[0..^4]), // remove the publisher (before the first .), then the standard _version_arch__{random p.Id}
339+
[0..^4]),
339340
_ => string.Join('.', p.Id.Split(".")[1..]),
340341
},
341342
"Scoop" => p.Id.Replace(".app", ""),

0 commit comments

Comments
 (0)