Unlock fixes

This commit is contained in:
crschnick 2024-02-27 04:10:57 +00:00
parent 6387419d70
commit 525916d59d
2 changed files with 8 additions and 2 deletions

View file

@ -14,7 +14,6 @@ import io.xpipe.app.update.XPipeDistributionType;
import io.xpipe.app.util.FileBridge; import io.xpipe.app.util.FileBridge;
import io.xpipe.app.util.LicenseProvider; import io.xpipe.app.util.LicenseProvider;
import io.xpipe.app.util.LocalShell; import io.xpipe.app.util.LocalShell;
import io.xpipe.app.util.UnlockAlert;
import io.xpipe.core.util.JacksonMapper; import io.xpipe.core.util.JacksonMapper;
public class BaseMode extends OperationMode { public class BaseMode extends OperationMode {
@ -55,7 +54,6 @@ public class BaseMode extends OperationMode {
// Initialize socket server before storage // Initialize socket server before storage
// as we should be prepared for git askpass commands // as we should be prepared for git askpass commands
AppSocketServer.init(); AppSocketServer.init();
UnlockAlert.showIfNeeded();
DataStorage.init(); DataStorage.init();
AppFileWatcher.init(); AppFileWatcher.init();
FileBridge.init(); FileBridge.init();

View file

@ -3,6 +3,7 @@ package io.xpipe.app.storage;
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.prefs.AppPrefs; import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.util.UnlockAlert;
import io.xpipe.core.process.OsType; import io.xpipe.core.process.OsType;
import io.xpipe.core.store.LocalStore; import io.xpipe.core.store.LocalStore;
import lombok.Getter; import lombok.Getter;
@ -54,6 +55,13 @@ public class StandardStorage extends DataStorage {
this.gitStorageHandler.init(dir); this.gitStorageHandler.init(dir);
this.gitStorageHandler.beforeStorageLoad(); this.gitStorageHandler.beforeStorageLoad();
try {
// This can fail if the necessary platform initialization fails
UnlockAlert.showIfNeeded();
} catch (Exception e) {
ErrorEvent.fromThrowable(e).terminal(true).build().handle();
}
try { try {
initSystemInfo(); initSystemInfo();
} catch (Exception e) { } catch (Exception e) {