Skip to content

Commit 377fe75

Browse files
committed
Trigger updating the app and spawn a new instance of the app
1 parent d5b47aa commit 377fe75

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/main/java/org/cryptomator/linux/update/FlatpakUpdater.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,21 @@ public UpdateCheckerTask getLatestReleaseChecker(DistributionChannel.Value chann
5555

5656
@Override
5757
public void triggerUpdate() throws UpdateFailedException {
58+
var monitor = getUpdateMonitor();
59+
portal.updateApp("x11:0", monitor, UpdatePortal.OPTIONS_DUMMY);
60+
}
61+
62+
@Override
63+
public long spawnApp() {
5864
var cwdPath = Util.stringToByteList(System.getProperty("user.dir"));
5965
List<List<Byte>> argv = List.of(
60-
Util.stringToByteList("org.cryptomator.Cryptomator"));
66+
Util.stringToByteList(APP_NAME));
6167
Map<UInt32, FileDescriptor> fds = Collections.emptyMap();
6268
Map<String, String> envs = Map.of();
6369
var flags = new UInt32(0);
6470
Map<String, Variant<?>> options = UpdatePortal.OPTIONS_DUMMY;
6571

66-
spawnApp(cwdPath, argv, fds, envs, flags, options);
67-
72+
return spawnApp(cwdPath, argv, fds, envs, flags, options).longValue();
6873
}
6974

7075
@Override

0 commit comments

Comments
 (0)