Merge pull request #1460 from GetStream/feat/exposePresence

feat(llc): expose presence property in Channel::watch method
This commit is contained in:
Rafal Adasiewicz
2023-02-09 15:49:47 +01:00
committed by GitHub
3 changed files with 10 additions and 7 deletions
+5 -2
View File
@@ -2,13 +2,16 @@
🐞 Fixed 🐞 Fixed
- Fixed streamWatchers. Before it was always new, now it is possible to follow the watchers of a channel. - Fixed streamWatchers. Before it was always new, now it is possible to follow the watchers of a channel.
## Upcoming
🔄 Changed 🔄 Changed
- Cancelling a attachment upload now removes the attachment from the message. - Cancelling a attachment upload now removes the attachment from the message.
✅ Added
- Added `presence` property to `Channel::watch` method.
## 5.3.0 ## 5.3.0
🔄 Changed 🔄 Changed
@@ -1234,11 +1234,11 @@ class Channel {
} }
/// Loads the initial channel state and watches for changes. /// Loads the initial channel state and watches for changes.
Future<ChannelState> watch() async { Future<ChannelState> watch({bool presence = false}) async {
ChannelState response; ChannelState response;
try { try {
response = await query(watch: true); response = await query(watch: true, presence: presence);
} catch (error, stackTrace) { } catch (error, stackTrace) {
if (!_initializedCompleter.isCompleted) { if (!_initializedCompleter.isCompleted) {
_initializedCompleter.completeError(error, stackTrace); _initializedCompleter.completeError(error, stackTrace);
@@ -77,7 +77,7 @@ class StreamMessageThemeData with Diagnosticable {
Color? reactionsBorderColor, Color? reactionsBorderColor,
Color? reactionsMaskColor, Color? reactionsMaskColor,
Color? linkBackgroundColor, Color? linkBackgroundColor,
int? urlLinkTitleMaxLine, int? urlAttachmentTitleMaxLine,
}) { }) {
return StreamMessageThemeData( return StreamMessageThemeData(
messageTextStyle: messageTextStyle ?? this.messageTextStyle, messageTextStyle: messageTextStyle ?? this.messageTextStyle,
@@ -95,7 +95,7 @@ class StreamMessageThemeData with Diagnosticable {
reactionsMaskColor: reactionsMaskColor ?? this.reactionsMaskColor, reactionsMaskColor: reactionsMaskColor ?? this.reactionsMaskColor,
linkBackgroundColor: linkBackgroundColor ?? this.linkBackgroundColor, linkBackgroundColor: linkBackgroundColor ?? this.linkBackgroundColor,
urlAttachmentTitleMaxLine: urlAttachmentTitleMaxLine:
urlLinkTitleMaxLine ?? this.urlAttachmentTitleMaxLine, urlAttachmentTitleMaxLine ?? this.urlAttachmentTitleMaxLine,
); );
} }
@@ -155,7 +155,7 @@ class StreamMessageThemeData with Diagnosticable {
reactionsBorderColor: other.reactionsBorderColor, reactionsBorderColor: other.reactionsBorderColor,
reactionsMaskColor: other.reactionsMaskColor, reactionsMaskColor: other.reactionsMaskColor,
linkBackgroundColor: other.linkBackgroundColor, linkBackgroundColor: other.linkBackgroundColor,
urlLinkTitleMaxLine: other.urlAttachmentTitleMaxLine, urlAttachmentTitleMaxLine: other.urlAttachmentTitleMaxLine,
); );
} }