Can't copy mxid or display name from member details screen
Steps to reproduce
- open room
- tap on someone's avatar or display name
- tap and hold on their mxid or display name
- tap copy
- try to paste somewhere
- notice nothing pasted
Alternatively
- tap share
- notice you are sharing nothing
Outcome
What did you expect?
Ability to copy or share the actual mxid/display name
What happened instead?
copying/sharing empty text
Your phone model
iPhone 13 mini / iPad Pro
Operating system version
iOS/iPadOS 17.4
Application version
1.5.10 (94)
Homeserver
Synapse 1.102.0 / Proxy 0.99.15
Will you send logs?
No
I just tested this and I didn't have any issue, could you provide us with more details on how to reproduce this issue? Did this happen in a room with a lot of members for example?
While testing, I just noticed that the copying issue seems to only happens after the first try (i.e., after force closing the app, I can successfully copy an mxid or display name one time, all further attempts copy nothing/clear the clipboard). This happens in every room I tested (public or private, encrypted or unencrypted and dm or non-dm). Sharing seems to work more reliably, however the preview is always empty, so it may have only been that one time (I only checked the preview while testing).
If this doesn't happen for you, I have no idea what you would need to do. For me, this happens on my iPhone and my iPad. On my iPad, this even is a fresh install (because of me testing #2537), so I don't think I broke some app state.
https://github.com/element-hq/element-x-ios/assets/29716248/6a35495f-0a17-420d-b19a-4b6b4ea12ee9
(I highlighted where I expected a preview in the share sheet. Please forgive my horrible editing)
No worries thank you for the extra details! Sadly I still can't reproduce the issue for me the share always displays a preview and reliably pastes/shares the right content, try to send us a rageshake, after having tried the share. This could also be a iOS 17.4 issue, that only happens on some devices given the inconsistency of how this happens. In the meantime I'll move this to uncommon
I just repeated the steps above and sent logs just in case they do help. I don't see anything in them, but you probably have a better idea of what to look for. Luckily, I don't need this feature all that often (I think this is the first time I ever used it), so this is not too bad.
Wasn't able to reproduce it either. Please reopen if it's still a problem.
I can still reproduce both issues (commenting and sharing) with 1.6.9 (108) on iOS 17.5.1 on both devices.
GitHub doesn't seem to let me reopen myself. I would appreciate it if you could do that.
I understand that it's hard to debug something you can't reproduce. If there is a way I can help debug this, please share.
Now that I can tap my way to higher log levels, would logs in debug or trace potentially help?
It's not really about that, the implementation is absolutely trivial and as far as I can tell we're not doing anything wrong. This one liner is all there is to it and SwiftUI should take care of everything else https://github.com/element-hq/element-x-ios/blob/develop/ElementX/Sources/Other/SwiftUI/Views/AvatarHeaderView.swift#L165
We use this API in 4 different places:
- the room details screen room topic
- the timeline item long press menu message preview header
- the settings screen app version at the bottom
- and the member details
Do any of those work for you?
Yeah, I figured something like this would be the case. I'm just grasping at straws here, as I have no clue what could be happening.
All of these places exhibit the same symptoms: empty share previews and copying empty text/clearing the clipboard after the first time.