Skip to content

Commit

Permalink
(maint) Switch from int to long
Browse files Browse the repository at this point in the history
When testing usage of nuget.org, there is a single package that has
over 3 billion downloads.  When attempting to view this package in
Chocolatey GUI, there is a convert error, when it tries to convert this
nubmer into an int.  This is a similar change to what was done in CCR,
when we crossed over the 1B mark for downloads.
  • Loading branch information
gep13 committed Apr 21, 2023
1 parent 0c0e105 commit 1d2d27f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class PackageViewModel :

private string _description;

private int _downloadCount;
private long _downloadCount;

private string _galleryDetailsUrl;

Expand Down Expand Up @@ -112,7 +112,7 @@ public class PackageViewModel :

private NuGetVersion _version;

private int _versionDownloadCount;
private long _versionDownloadCount;

public PackageViewModel(
IChocolateyService chocolateyService,
Expand Down Expand Up @@ -199,7 +199,7 @@ public string Description
set { SetPropertyValue(ref _description, value); }
}

public int DownloadCount
public long DownloadCount
{
get { return _downloadCount; }
set { SetPropertyValue(ref _downloadCount, value); }
Expand Down Expand Up @@ -384,7 +384,7 @@ public NuGetVersion Version
set { SetPropertyValue(ref _version, value); }
}

public int VersionDownloadCount
public long VersionDownloadCount
{
get { return _versionDownloadCount; }
set { SetPropertyValue(ref _versionDownloadCount, value); }
Expand Down
4 changes: 2 additions & 2 deletions Source/ChocolateyGui.Common/Models/Package.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Package

public string Description { get; set; }

public int DownloadCount { get; set; }
public long DownloadCount { get; set; }

public string GalleryDetailsUrl { get; set; }

Expand Down Expand Up @@ -68,6 +68,6 @@ public class Package

public NuGetVersion Version { get; set; }

public int VersionDownloadCount { get; set; }
public long VersionDownloadCount { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface IPackageViewModel

string Description { get; set; }

int DownloadCount { get; set; }
long DownloadCount { get; set; }

string GalleryDetailsUrl { get; set; }

Expand Down Expand Up @@ -73,7 +73,7 @@ public interface IPackageViewModel

NuGetVersion Version { get; set; }

int VersionDownloadCount { get; set; }
long VersionDownloadCount { get; set; }

Task Install();

Expand Down

0 comments on commit 1d2d27f

Please sign in to comment.