From cc1ad224e2137177ff41b32d10287c4d79540e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Adasiewicz?= Date: Thu, 9 Feb 2023 13:14:44 +0100 Subject: [PATCH 1/3] feat(llc): expose presence property in Channel::watch method --- packages/stream_chat/CHANGELOG.md | 7 +++++-- packages/stream_chat/lib/src/client/channel.dart | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index f0ee6485..04a47600 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -2,13 +2,16 @@ 🐞 Fixed -- Fixed streamWatchers. Before it was always new, now it is possible to follow the watchers of a channel. -## Upcoming +- Fixed streamWatchers. Before it was always new, now it is possible to follow the watchers of a channel. 🔄 Changed - Cancelling a attachment upload now removes the attachment from the message. +✅ Added + +- Added `presence` property to `Channel::watch` method. + ## 5.3.0 🔄 Changed diff --git a/packages/stream_chat/lib/src/client/channel.dart b/packages/stream_chat/lib/src/client/channel.dart index 528a0fee..7d8515c7 100644 --- a/packages/stream_chat/lib/src/client/channel.dart +++ b/packages/stream_chat/lib/src/client/channel.dart @@ -1234,11 +1234,11 @@ class Channel { } /// Loads the initial channel state and watches for changes. - Future watch() async { + Future watch({bool presence = false}) async { ChannelState response; try { - response = await query(watch: true); + response = await query(watch: true, presence: presence); } catch (error, stackTrace) { if (!_initializedCompleter.isCompleted) { _initializedCompleter.completeError(error, stackTrace); From 21897381350b7984ea0d7d739c978e8d1f611deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Adasiewicz?= Date: Thu, 9 Feb 2023 13:59:12 +0100 Subject: [PATCH 2/3] fix analyze --- packages/stream_chat_flutter/lib/src/theme/message_theme.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stream_chat_flutter/lib/src/theme/message_theme.dart b/packages/stream_chat_flutter/lib/src/theme/message_theme.dart index 7f34800c..c022d6a6 100644 --- a/packages/stream_chat_flutter/lib/src/theme/message_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/message_theme.dart @@ -95,7 +95,7 @@ class StreamMessageThemeData with Diagnosticable { reactionsMaskColor: reactionsMaskColor ?? this.reactionsMaskColor, linkBackgroundColor: linkBackgroundColor ?? this.linkBackgroundColor, urlAttachmentTitleMaxLine: - urlLinkTitleMaxLine ?? this.urlAttachmentTitleMaxLine, + urlLinkTitleMaxLine ?? urlAttachmentTitleMaxLine, ); } From ae5a8af93f1f5e79143836a3ec44f9487da9d0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Adasiewicz?= Date: Thu, 9 Feb 2023 14:24:13 +0100 Subject: [PATCH 3/3] rename urlLinkTitleMaxLine to urlAttachmentTitleMaxLine --- .../stream_chat_flutter/lib/src/theme/message_theme.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/stream_chat_flutter/lib/src/theme/message_theme.dart b/packages/stream_chat_flutter/lib/src/theme/message_theme.dart index c022d6a6..d95ed7bb 100644 --- a/packages/stream_chat_flutter/lib/src/theme/message_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/message_theme.dart @@ -77,7 +77,7 @@ class StreamMessageThemeData with Diagnosticable { Color? reactionsBorderColor, Color? reactionsMaskColor, Color? linkBackgroundColor, - int? urlLinkTitleMaxLine, + int? urlAttachmentTitleMaxLine, }) { return StreamMessageThemeData( messageTextStyle: messageTextStyle ?? this.messageTextStyle, @@ -95,7 +95,7 @@ class StreamMessageThemeData with Diagnosticable { reactionsMaskColor: reactionsMaskColor ?? this.reactionsMaskColor, linkBackgroundColor: linkBackgroundColor ?? this.linkBackgroundColor, urlAttachmentTitleMaxLine: - urlLinkTitleMaxLine ?? urlAttachmentTitleMaxLine, + urlAttachmentTitleMaxLine ?? this.urlAttachmentTitleMaxLine, ); } @@ -155,7 +155,7 @@ class StreamMessageThemeData with Diagnosticable { reactionsBorderColor: other.reactionsBorderColor, reactionsMaskColor: other.reactionsMaskColor, linkBackgroundColor: other.linkBackgroundColor, - urlLinkTitleMaxLine: other.urlAttachmentTitleMaxLine, + urlAttachmentTitleMaxLine: other.urlAttachmentTitleMaxLine, ); }