Skip to content

Multiple Emoji to clipboard option#149

Open
ijin82 wants to merge 1 commit into
FelipeFTN:masterfrom
ijin82:master
Open

Multiple Emoji to clipboard option#149
ijin82 wants to merge 1 commit into
FelipeFTN:masterfrom
ijin82:master

Conversation

@ijin82

@ijin82 ijin82 commented Jul 1, 2026

Copy link
Copy Markdown

Option to copy multiple Emoji to clipboard without Emoji dialog close

@FelipeFTN FelipeFTN left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Just bringing some thoughts

Comment on lines +189 to +198
if (this._settings.get_boolean("multiple-emoji-to-clipboard")) {
if (this.emojiCopy._firstRightClick) {
this.emojiCopy._firstRightClick = false;
return this.replaceClipboardAndStay(emojiToCopy);
} else {
return this.addToClipboardAndStay(emojiToCopy);
}
} else {
return this.addToClipboardAndStay(emojiToCopy);
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think this function can be simplified as this:

Suggested change
if (this._settings.get_boolean("multiple-emoji-to-clipboard")) {
if (this.emojiCopy._firstRightClick) {
this.emojiCopy._firstRightClick = false;
return this.replaceClipboardAndStay(emojiToCopy);
} else {
return this.addToClipboardAndStay(emojiToCopy);
}
} else {
return this.addToClipboardAndStay(emojiToCopy);
}
let multipleEmojisEnabled = this._settings.get_boolean("multiple-emoji-to-clipboard");
if (this.emojiCopy._firstRightClick && multipleEmojisEnabled) {
this.emojiCopy._firstRightClick = false;
return this.replaceClipboardAndStay(emojiToCopy);
}
return this.addToClipboardAndStay(emojiToCopy);

Comment on lines +189 to +192
if (open) {
this._firstRightClick = true;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think you could put this logic inside the already existing if (open) statement in line 194

this._settings = this.getSettings();
this.position = this._settings.get_string("position");
this._permanentItems = 0;
this._firstRightClick = true;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Quick question: Why is this _firstightClick variable necessary?

@FelipeFTN FelipeFTN added the 💯 enhancement New feature or request label Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💯 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants