Merge branch 'develop' into S-ecki/develop
This commit is contained in:
@@ -15,6 +15,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
if: github.event.pull_request.draft == false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Git Checkout"
|
- name: "Git Checkout"
|
||||||
@@ -45,6 +46,7 @@ jobs:
|
|||||||
|
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.pull_request.draft == false
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- name: "Git Checkout"
|
- name: "Git Checkout"
|
||||||
@@ -73,6 +75,7 @@ jobs:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
if: github.event.pull_request.draft == false
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- name: "Git Checkout"
|
- name: "Git Checkout"
|
||||||
@@ -123,3 +126,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: packages/stream_chat_flutter/coverage/lcov.info
|
path: packages/stream_chat_flutter/coverage/lcov.info
|
||||||
min_coverage: 67
|
min_coverage: 67
|
||||||
|
|
||||||
|
draft-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.pull_request.draft == true
|
||||||
|
timeout-minutes: 1
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Run a one-line script
|
||||||
|
run: echo Draft PR, you are good.
|
||||||
@@ -11,6 +11,12 @@
|
|||||||
- Mentions overlay now doesn't overflow when there is not enough height available
|
- Mentions overlay now doesn't overflow when there is not enough height available
|
||||||
- Updated `stream_chat_flutter_core` dependency to [`3.5.1`](https://pub.dev/packages/stream_chat_flutter_core/changelog).
|
- Updated `stream_chat_flutter_core` dependency to [`3.5.1`](https://pub.dev/packages/stream_chat_flutter_core/changelog).
|
||||||
|
|
||||||
|
|
||||||
|
✅ Added
|
||||||
|
|
||||||
|
- `onLinkTap` for `MessageWidget` can now be passed down to `UrlAttachment`.
|
||||||
|
|
||||||
|
|
||||||
## 3.5.0
|
## 3.5.0
|
||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class UrlAttachment extends StatelessWidget {
|
|||||||
horizontal: 16,
|
horizontal: 16,
|
||||||
vertical: 8,
|
vertical: 8,
|
||||||
),
|
),
|
||||||
|
this.onLinkTap,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
/// Attachment to be displayed
|
/// Attachment to be displayed
|
||||||
@@ -28,13 +29,20 @@ class UrlAttachment extends StatelessWidget {
|
|||||||
/// [MessageThemeData] for showing image title
|
/// [MessageThemeData] for showing image title
|
||||||
final MessageThemeData messageTheme;
|
final MessageThemeData messageTheme;
|
||||||
|
|
||||||
|
/// The function called when tapping on a link
|
||||||
|
final void Function(String)? onLinkTap;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final chatThemeData = StreamChatTheme.of(context);
|
final chatThemeData = StreamChatTheme.of(context);
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
final titleLink = urlAttachment.titleLink;
|
final titleLink = urlAttachment.titleLink;
|
||||||
if (titleLink != null) launchURL(context, titleLink);
|
if (titleLink != null) {
|
||||||
|
onLinkTap != null
|
||||||
|
? onLinkTap!(titleLink)
|
||||||
|
: launchURL(context, titleLink);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
|||||||
@@ -1013,6 +1013,7 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
hostDisplayName: hostDisplayName,
|
hostDisplayName: hostDisplayName,
|
||||||
textPadding: widget.textPadding,
|
textPadding: widget.textPadding,
|
||||||
messageTheme: widget.messageTheme,
|
messageTheme: widget.messageTheme,
|
||||||
|
onLinkTap: widget.onLinkTap,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user