Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only allow one window to run export per user #8123

Open
wants to merge 2 commits into
base: export-integration
Choose a base branch
from

Conversation

wrdhub
Copy link
Contributor

@wrdhub wrdhub commented Dec 12, 2024

Export will continue in a different window if one was closed

Close #8063

Export will continue in a different window if one was closed

Close #8063

Co-authored-by: wrd <[email protected]>
@wrdhub wrdhub requested a review from charlag December 12, 2024 08:57
Copy link
Contributor

@charlag charlag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job making it work! Distributed things are hard!

@@ -187,6 +199,7 @@ export class MailExportController {
} catch (e) {
if (isOfflineError(e)) {
console.log(TAG, "Offline, will retry later")
// FIXME: should we use scheduler here too?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there isn't a strong reason to, maybe only to make it testable

src/common/desktop/ApplicationWindow.ts Outdated Show resolved Hide resolved
@@ -73,6 +73,7 @@ export class ApplicationWindow {
private readonly localShortcut: LocalShortcutManager,
private readonly themeFacade: DesktopThemeFacade,
private readonly remoteBridge: RemoteBridge,
private desktopExportLocks: Set<string>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

napkin pitch: what if we make the "window cleanup" mechanism more generic and inject some listener here instead? and coordination of these listeners can be outside of the poor ApplicationWindow.

src/common/desktop/export/DesktopExportFacade.ts Outdated Show resolved Hide resolved
@hrb-hub hrb-hub linked an issue Dec 12, 2024 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure only single app window is running the export
3 participants