-
Notifications
You must be signed in to change notification settings - Fork 161
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
Tapping user mxid or room alias copies it to the clipboard #3502
base: develop
Are you sure you want to change the base?
Conversation
Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:
|
21a9c39
to
bf360d8
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3502 +/- ##
===========================================
- Coverage 82.68% 82.66% -0.03%
===========================================
Files 1732 1732
Lines 40982 41022 +40
Branches 4966 4972 +6
===========================================
+ Hits 33886 33910 +24
- Misses 5341 5354 +13
- Partials 1755 1758 +3 ☔ View full report in Codecov by Sentry. |
You need the View where SnackBar may be rendered to have a SnackBarHost. You can look for |
Perfect, thanks Benoit. I'll give that a go in a few days and see how I get on |
Make user id and room alias text in room/user view pages clickable and copy the text to the clipboard on click. Fixes element-hq#3496 Signed-off-by: Joe Groocock <[email protected]>
bf360d8
to
c88465c
Compare
Snackbars are fixed, thanks! |
@@ -130,6 +130,7 @@ | |||
<string name="common_call_invite">"Call in progress (unsupported)"</string> | |||
<string name="common_call_started">"Call started"</string> | |||
<string name="common_chat_backup">"Chat backup"</string> | |||
<string name="common_copied_to_clipboard">"Copied to clipboard"</string> |
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.
I have added the string to Localazy at https://localazy.com/p/element/source-language/_a7211042194211892347. (there is no action required from you since the key is the same).
Yeah I thought about this too. I'm not sure which subset of Android this little pop-up applies to. My guess would be either Pixel, or some modern Android version. There are likely some devices that don't have this and on those the snackbar would be useful? There are other places in the app that also use this snackbar popup when copying to the clipboard. I've added it here for consistency, but I'd be happy to remove it (It'll greatly simplify the patch) if the decision is taken to remove them from other places in the app too. I'm not sure what iOS does |
I'm pretty sure this started on Android 13. |
Content
Make user id and room alias text in room/user view pages clickable and copy the text to the clipboard on click.
One small issue with this implementation is the snackbars don't appear until the view is closed.. not sure why, because I copy-pasted some other code that does the same thing and it works fine. Coroutines in Kotlin are
shitweird. Suggestions welcome 🙏🏻Motivation and context
Fixes #3496
(Do note that I have no idea what I'm doing.. I merely mimic what I see until it works)
Screenshots / GIFs
8d8853b8-dcc0-4a9d-9d9b-083791d765db.mp4
Tests
Finger touchy screeny
Tested devices
Checklist