Skip to content

Commit

Permalink
only pull clipboard when requested in the add dialog (#1764)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellacosse authored Oct 31, 2023
1 parent c68836d commit 425d6c2
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();
}

// 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 425d6c2

Please sign in to comment.