mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-07 04:18:26 +02:00
Removed VersionInfo#isTrusted
This commit is contained in:
parent
887e754f0d
commit
4bf38456b3
@ -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!" +
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user