mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
feat: show latest url
This commit is contained in:
parent
7bfdae7940
commit
0ae5b8b25c
2 changed files with 5 additions and 4 deletions
|
|
@ -99,15 +99,15 @@ export default function setupViewEventHandlers(view: BrowserView, browserWindow:
|
|||
if (workspaceObject === undefined) {
|
||||
return;
|
||||
}
|
||||
await workspaceService.updateMetaData(workspace.id, {
|
||||
isLoading: false,
|
||||
});
|
||||
const currentUrl = view.webContents.getURL();
|
||||
await workspaceService.update(workspace.id, {
|
||||
lastUrl: currentUrl,
|
||||
});
|
||||
// fix https://github.com/atomery/webcatalog/issues/870
|
||||
await workspaceViewService.realignActiveWorkspace();
|
||||
await workspaceService.updateMetaData(workspace.id, {
|
||||
isLoading: false,
|
||||
});
|
||||
});
|
||||
// focus on initial load
|
||||
// https://github.com/atomery/webcatalog/issues/398
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ export class WorkspaceView implements IWorkspaceViewService {
|
|||
}
|
||||
loadFailed = typeof workspaceMetadata.didFailLoadErrorMessage === 'string' && workspaceMetadata.didFailLoadErrorMessage.length > 0;
|
||||
if (loadFailed) {
|
||||
throw new WorkspaceFailedToLoadError(workspaceMetadata.didFailLoadErrorMessage!, homeUrl);
|
||||
const latestWorkspaceData = await this.workspaceService.get(workspaceID);
|
||||
throw new WorkspaceFailedToLoadError(workspaceMetadata.didFailLoadErrorMessage!, latestWorkspaceData?.lastUrl ?? homeUrl);
|
||||
}
|
||||
// get sync process ready
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue