mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Fixes #2924 - Allow timeline messages text selection on both the Mac and on iOS (not on long press but a double tap)
- remove double tap to show the emoji picker as it clashes with the selection and was introduced before the rich timeline item menu was introduced
This commit is contained in:
committed by
Stefan Ceriu
parent
63a474bb3f
commit
2dccfff3e8
@@ -81,7 +81,6 @@ struct MessageText: UIViewRepresentable {
|
|||||||
textView.adjustsFontForContentSizeCategory = true
|
textView.adjustsFontForContentSizeCategory = true
|
||||||
|
|
||||||
// Required to allow tapping links
|
// Required to allow tapping links
|
||||||
// We disable selection at delegate level
|
|
||||||
textView.isSelectable = true
|
textView.isSelectable = true
|
||||||
textView.isUserInteractionEnabled = true
|
textView.isUserInteractionEnabled = true
|
||||||
|
|
||||||
@@ -135,10 +134,6 @@ struct MessageText: UIViewRepresentable {
|
|||||||
self.openURLAction = openURLAction
|
self.openURLAction = openURLAction
|
||||||
}
|
}
|
||||||
|
|
||||||
func textViewDidChangeSelection(_ textView: UITextView) {
|
|
||||||
textView.selectedTextRange = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool {
|
func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool {
|
||||||
switch interaction {
|
switch interaction {
|
||||||
case .invokeDefaultAction:
|
case .invokeDefaultAction:
|
||||||
|
|||||||
@@ -128,9 +128,6 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
|||||||
|
|
||||||
var messageBubble: some View {
|
var messageBubble: some View {
|
||||||
styledContent
|
styledContent
|
||||||
.onTapGesture(count: 2) {
|
|
||||||
context.send(viewAction: .displayEmojiPicker(itemID: timelineItem.id))
|
|
||||||
}
|
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
context.send(viewAction: .itemTapped(itemID: timelineItem.id))
|
context.send(viewAction: .itemTapped(itemID: timelineItem.id))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Allow timeline messages text selection on both the Mac and on iOS (not on long press but a double tap)
|
||||||
Reference in New Issue
Block a user