Skip to content

Commit

Permalink
only pull clipboard when requested in the add dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Oct 31, 2023
1 parent c68836d commit a2b684e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/www/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ export class App {
this.displayPrivacyView();
}
this.displayZeroStateUi();
this.pullClipboardText();
}

showLocalizedError(error?: Error, toastDuration = 10000) {
Expand Down Expand Up @@ -300,6 +299,7 @@ export class App {

private requestPromptAddServer() {
this.rootEl.promptAddServer();
this.pullClipboardText();

Check warning on line 302 in src/www/app/app.ts

View check run for this annotation

Codecov / codecov/patch

src/www/app/app.ts#L302

Added line #L302 was not covered by tests
}

// Caches an ignored server access key so we don't prompt the user to add it again.
Expand Down
5 changes: 0 additions & 5 deletions src/www/app/cordova_main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ const OUTLINE_PLUGIN_NAME = 'OutlinePlugin';

// Pushes a clipboard event whenever the app is brought to the foreground.
class CordovaClipboard extends AbstractClipboard {
constructor() {
super();
document.addEventListener('resume', this.emitEvent.bind(this));
}

getContents() {
return new Promise<string>((resolve, reject) => {
cordova.plugins.clipboard.paste(resolve, reject);
Expand Down

0 comments on commit a2b684e

Please sign in to comment.