From a2b684e94fa83046fc3688ada3c593686f28717a Mon Sep 17 00:00:00 2001 From: "daniellacosse@google.com" Date: Mon, 30 Oct 2023 21:14:29 -0400 Subject: [PATCH] only pull clipboard when requested in the add dialog --- src/www/app/app.ts | 2 +- src/www/app/cordova_main.ts | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/www/app/app.ts b/src/www/app/app.ts index 6993c5afe47..a22c3cd10de 100644 --- a/src/www/app/app.ts +++ b/src/www/app/app.ts @@ -154,7 +154,6 @@ export class App { this.displayPrivacyView(); } this.displayZeroStateUi(); - this.pullClipboardText(); } showLocalizedError(error?: Error, toastDuration = 10000) { @@ -300,6 +299,7 @@ export class App { private requestPromptAddServer() { this.rootEl.promptAddServer(); + this.pullClipboardText(); } // Caches an ignored server access key so we don't prompt the user to add it again. diff --git a/src/www/app/cordova_main.ts b/src/www/app/cordova_main.ts index 025d713ecfb..75c3372a31a 100644 --- a/src/www/app/cordova_main.ts +++ b/src/www/app/cordova_main.ts @@ -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((resolve, reject) => { cordova.plugins.clipboard.paste(resolve, reject);