SES-4977 : Don't show link preview acceptance dialog when a user is typing, only when a link is pasted#1773
Merged
jbsession merged 8 commits intoDec 16, 2025
Conversation
Comment on lines
+44
to
+50
| // We can only get the latest copied item from the clipboard | ||
| val clipText = clipboard.primaryClip | ||
| ?.getItemAt(0) | ||
| ?.coerceToText(context) | ||
| ?.toString() | ||
|
|
||
| val copiedFromClipboard = !clipText.isNullOrEmpty() && inserted == clipText |
Collaborator
There was a problem hiding this comment.
Do we really care if this is from clipboard? I feel like any "bulk insert" alone warrants the link preview generation prompt
Collaborator
Author
There was a problem hiding this comment.
Yeah this can probably be removed.
SessionHero01
approved these changes
Dec 14, 2025
| import android.content.res.Resources | ||
| import android.net.Uri | ||
| import android.util.AttributeSet | ||
| import android.util.Log |
Collaborator
There was a problem hiding this comment.
May need to clean up the import or use our Log instead
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes how we show the dialog for enabling link preview.
Show only the dialog when a user pastes a link instead of typing it.