fixed chat bubble link styling and gesture handling, and added android package visibility for common schemes
This commit is contained in:
@@ -205,6 +205,18 @@ class _ChatBubbleState extends State<ChatBubble>
|
||||
onRefetch: widget.refetch,
|
||||
);
|
||||
|
||||
/// True only for messages whose body has a meaningful tap action (poll
|
||||
/// dialog or file download/cancel). For plain text messages we leave
|
||||
/// `onTap: null` on the bubble's `GestureDetector` so its
|
||||
/// `TapGestureRecognizer` does not enter the gesture arena — otherwise
|
||||
/// it competes with (and blocks) the per-link `TapGestureRecognizer`s
|
||||
/// that `HighlightedLinkify` attaches to URL spans.
|
||||
bool get _hasTapAction {
|
||||
final obj = message.originalData?['object'];
|
||||
if (obj?.type == RichObjectStringObjectType.talkPoll) return true;
|
||||
return message.file != null;
|
||||
}
|
||||
|
||||
void _onTap() {
|
||||
final obj = message.originalData?['object'];
|
||||
if (obj?.type == RichObjectStringObjectType.talkPoll) {
|
||||
@@ -302,7 +314,7 @@ class _ChatBubbleState extends State<ChatBubble>
|
||||
},
|
||||
onLongPress: _showOptionsDialog,
|
||||
onDoubleTap: _showOptionsDialog,
|
||||
onTap: _onTap,
|
||||
onTap: _hasTapAction ? _onTap : null,
|
||||
child: Transform.translate(
|
||||
offset: _position,
|
||||
child: Bubble(
|
||||
|
||||
Reference in New Issue
Block a user