Move app store validator to CarpetSettings

This commit is contained in:
altrisi committed 2023-06-26 18:44:15 +02:00
1 parent 177179b70a
commit db2023f5b9
3 files changed
+33 -36

No files matched your search

@@ -58,6 +58,10 @@ public class AppStoreManager
scarpetRepoLink = link;
}
public static boolean enabled()
{
return scarpetRepoLink != null;
}
private record AppInfo(String name, String url, StoreNode source)
{
@@ -123,7 +127,7 @@ public class AppStoreManager
{
return;
}
if (scarpetRepoLink == null)
if (!enabled())
{
throw new IOException("Accessing scarpet app repo is disabled");
}