-
Notifications
You must be signed in to change notification settings - Fork 50
SES-4977 : Don't show link preview acceptance dialog when a user is typing, only when a link is pasted #1773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SES-4977 : Don't show link preview acceptance dialog when a user is typing, only when a link is pasted #1773
Conversation
| // 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really care if this is from clipboard? I feel like any "bulk insert" alone warrants the link preview generation prompt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this can probably be removed.
SessionHero01
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| import android.content.res.Resources | ||
| import android.net.Uri | ||
| import android.util.AttributeSet | ||
| import android.util.Log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May need to clean up the import or use our Log instead
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.