fix: surface remote sync reauthentication failures (#1351)

This commit is contained in:
ZacharyZcR
2026-08-27 17:06:16 +08:00
committed by GitHub
parent 6277d15c2a
commit 50f1882fa9
8 changed files with 179 additions and 26 deletions
+3 -2
View File
@@ -1654,7 +1654,7 @@ ipcMain.handle("clear-remote-sync-config", async () => {
return result;
});
ipcMain.handle("save-remote-sync-jwt", (_event, token) => {
ipcMain.handle("save-remote-sync-jwt", async (_event, token) => {
const result = remoteSync.saveRemoteSyncJwt(token);
if (result.success) {
remoteSync.getRemoteSyncEngine()?.updateStatus({
@@ -1662,7 +1662,8 @@ ipcMain.handle("save-remote-sync-jwt", (_event, token) => {
needsReauth: false,
lastError: null,
});
remoteSync.getRemoteSyncEngine()?.syncNow();
const status = await remoteSync.getRemoteSyncEngine()?.syncNow();
return { ...result, status: status || null };
}
return result;
});