mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 15:10:23 +00:00
Fine tune updater
This commit is contained in:
parent
3be6f70272
commit
65a4cc424b
4 changed files with 6 additions and 1 deletions
|
@ -2,6 +2,7 @@ package io.xpipe.app.ext;
|
||||||
|
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.core.process.ShellControl;
|
import io.xpipe.core.process.ShellControl;
|
||||||
|
import io.xpipe.core.process.StubShellControl;
|
||||||
import io.xpipe.core.store.*;
|
import io.xpipe.core.store.*;
|
||||||
|
|
||||||
public interface ShellStore extends DataStore, FileSystemStore, ValidatableStore, SingletonSessionStore<ShellSession> {
|
public interface ShellStore extends DataStore, FileSystemStore, ValidatableStore, SingletonSessionStore<ShellSession> {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import io.xpipe.app.core.AppProperties;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.app.issue.TrackEvent;
|
import io.xpipe.app.issue.TrackEvent;
|
||||||
import io.xpipe.app.util.HttpHelper;
|
import io.xpipe.app.util.HttpHelper;
|
||||||
|
import io.xpipe.app.util.LicenseProvider;
|
||||||
import io.xpipe.core.process.OsType;
|
import io.xpipe.core.process.OsType;
|
||||||
import io.xpipe.core.util.JacksonMapper;
|
import io.xpipe.core.util.JacksonMapper;
|
||||||
|
|
||||||
|
@ -127,6 +128,7 @@ public class AppDownloads {
|
||||||
req.put("uuid", AppProperties.get().getUuid().toString());
|
req.put("uuid", AppProperties.get().getUuid().toString());
|
||||||
req.put("version", AppProperties.get().getVersion());
|
req.put("version", AppProperties.get().getVersion());
|
||||||
req.put("first", first);
|
req.put("first", first);
|
||||||
|
req.put("license", LicenseProvider.get().getLicenseId());
|
||||||
var url = URI.create("https://api.xpipe.io/version");
|
var url = URI.create("https://api.xpipe.io/version");
|
||||||
|
|
||||||
var builder = HttpRequest.newBuilder();
|
var builder = HttpRequest.newBuilder();
|
||||||
|
|
|
@ -100,7 +100,7 @@ public abstract class UpdateHandler {
|
||||||
private void startBackgroundUpdater() {
|
private void startBackgroundUpdater() {
|
||||||
ThreadHelper.createPlatformThread("updater", true, () -> {
|
ThreadHelper.createPlatformThread("updater", true, () -> {
|
||||||
var checked = false;
|
var checked = false;
|
||||||
ThreadHelper.sleep(Duration.ofMinutes(5).toMillis());
|
ThreadHelper.sleep(Duration.ofMinutes(1).toMillis());
|
||||||
event("Starting background updater thread");
|
event("Starting background updater thread");
|
||||||
while (true) {
|
while (true) {
|
||||||
if (AppPrefs.get().automaticallyUpdate().get()
|
if (AppPrefs.get().automaticallyUpdate().get()
|
||||||
|
|
|
@ -20,6 +20,8 @@ public abstract class LicenseProvider {
|
||||||
|
|
||||||
public abstract boolean hasLicense();
|
public abstract boolean hasLicense();
|
||||||
|
|
||||||
|
public abstract String getLicenseId();
|
||||||
|
|
||||||
public abstract ObservableValue<String> licenseTitle();
|
public abstract ObservableValue<String> licenseTitle();
|
||||||
|
|
||||||
public abstract LicensedFeature getFeature(String id);
|
public abstract LicensedFeature getFeature(String id);
|
||||||
|
|
Loading…
Reference in a new issue