Removed VersionInfo#isTrusted

This commit is contained in:
Rsl1122 2019-08-25 14:12:57 +03:00
parent 887e754f0d
commit 4bf38456b3
3 changed files with 0 additions and 7 deletions

View File

@ -105,7 +105,6 @@ public class VersionCheckSystem implements SubSystem {
public Optional<String> getUpdateButton() {
return getNewVersionAvailable()
.filter(VersionInfo::isTrusted)
.map(v -> "<button class=\"btn bg-white col-plan\" data-target=\"#updateModal\" data-toggle=\"modal\" type=\"button\">" +
"<i class=\"fa fa-fw fa-download\"></i> v." + v.getVersion().getVersionString() +
"</button>"
@ -120,7 +119,6 @@ public class VersionCheckSystem implements SubSystem {
public String getUpdateModal() {
return getNewVersionAvailable()
.filter(VersionInfo::isTrusted)
.map(v -> "<div class=\"modal-header\">" +
"<h5 class=\"modal-title\" id=\"updateModalLabel\">" +
"<i class=\"fa fa-fw fa-download\"></i> Version " + v.getVersion().getVersionString() + " is Available!" +

View File

@ -55,10 +55,6 @@ public class VersionInfo implements Comparable<VersionInfo> {
return changeLogUrl;
}
public boolean isTrusted() {
return downloadUrl.startsWith("https://github.com/Rsl1122/Plan-PlayerAnalytics/releases/download/");
}
@Override
public boolean equals(Object o) {
if (this == o) return true;

View File

@ -37,7 +37,6 @@ class VersionInfoLoaderTest {
VersionInfo oldest = versions.get(versions.size() - 1);
assertEquals(new Version("4.1.7"), oldest.getVersion());
assertTrue(oldest.isRelease());
assertTrue(oldest.isTrusted());
}
}