@@ -698,6 +698,7 @@ class PatchFullDisplay : public Component, public DownloadPool::DownloadListener
698
698
public:
699
699
enum Type
700
700
{
701
+ UpdateAvailable,
701
702
AlreadyInstalled,
702
703
Download,
703
704
Store,
@@ -715,7 +716,7 @@ class PatchFullDisplay : public Component, public DownloadPool::DownloadListener
715
716
String getIcon ()
716
717
{
717
718
if (type == AlreadyInstalled) return isMouseOver () ? Icons::Reset : Icons::Checkmark;
718
- if (type == Download) return Icons::Download;
719
+ if (type == Download || type == UpdateAvailable ) return Icons::Download;
719
720
if (type == Store) return Icons::Store;
720
721
if (type == View) return Icons::Info;
721
722
if (type == Cancel) return {};
@@ -724,6 +725,7 @@ class PatchFullDisplay : public Component, public DownloadPool::DownloadListener
724
725
725
726
String getText ()
726
727
{
728
+ if (type == UpdateAvailable) return " Update" ;
727
729
if (type == AlreadyInstalled) return isMouseOver () ? " Reinstall" : " Installed" ;
728
730
if (type == Download) return " Download" ;
729
731
if (type == Store) return " View in store" ;
@@ -866,7 +868,9 @@ class PatchFullDisplay : public Component, public DownloadPool::DownloadListener
866
868
867
869
auto fileName = URL (currentPatch.download ).getFileName ();
868
870
869
- if (currentPatch.isPatchInstalled ()) {
871
+ if (currentPatch.updateAvailable ()) {
872
+ downloadButton.setType (LinkButton::UpdateAvailable);
873
+ } else if (currentPatch.isPatchInstalled ()) {
870
874
downloadButton.setType (LinkButton::AlreadyInstalled);
871
875
} else if (currentPatch.isPatchArchive ()) {
872
876
downloadButton.setType (LinkButton::Download);
@@ -894,10 +898,8 @@ class PatchFullDisplay : public Component, public DownloadPool::DownloadListener
894
898
}
895
899
}
896
900
897
- if (result.size () <= 1 )
901
+ if (result.size () < 3 )
898
902
{
899
- result.clear ();
900
-
901
903
for (auto & [patch, flags] : toFilter)
902
904
{
903
905
if (result.size () >= 3 ) break ;
0 commit comments