update rxdart
This commit is contained in:
@@ -1427,7 +1427,7 @@ class ChannelClientState {
|
||||
/// This flag should be managed by UI sdks.
|
||||
/// When false, any new message (received by WebSocket event
|
||||
/// - [EventType.messageNew]) will not be pushed on to message list.
|
||||
bool get isUpToDate => _isUpToDateController.value ?? true;
|
||||
bool get isUpToDate => _isUpToDateController.value;
|
||||
|
||||
set isUpToDate(bool isUpToDate) => _isUpToDateController.add(isUpToDate);
|
||||
|
||||
@@ -1528,7 +1528,7 @@ class ChannelClientState {
|
||||
}
|
||||
|
||||
if (_countMessageAsUnread(message)) {
|
||||
_unreadCountController.add(_unreadCountController.value! + 1);
|
||||
_unreadCountController.add(_unreadCountController.value + 1);
|
||||
}
|
||||
}));
|
||||
}
|
||||
@@ -1766,13 +1766,13 @@ class ChannelClientState {
|
||||
a.createdAt.compareTo(b.createdAt);
|
||||
|
||||
/// The channel state related to this client
|
||||
ChannelState get _channelState => _channelStateController.value!;
|
||||
ChannelState get _channelState => _channelStateController.value;
|
||||
|
||||
/// The channel state related to this client as a stream
|
||||
Stream<ChannelState> get channelStateStream => _channelStateController.stream;
|
||||
|
||||
/// The channel state related to this client
|
||||
ChannelState get channelState => _channelStateController.value!;
|
||||
ChannelState get channelState => _channelStateController.value;
|
||||
late BehaviorSubject<ChannelState> _channelStateController;
|
||||
|
||||
final Debounce _debouncedUpdatePersistenceChannelState;
|
||||
@@ -1784,7 +1784,7 @@ class ChannelClientState {
|
||||
|
||||
/// The channel threads related to this channel
|
||||
Map<String, List<Message>> get threads =>
|
||||
_threadsController.value!.map((key, value) => MapEntry(key, value));
|
||||
_threadsController.value.map((key, value) => MapEntry(key, value));
|
||||
|
||||
/// The channel threads related to this channel as a stream
|
||||
Stream<Map<String, List<Message>>> get threadsStream =>
|
||||
@@ -1801,7 +1801,7 @@ class ChannelClientState {
|
||||
}
|
||||
|
||||
/// Channel related typing users last value
|
||||
List<User> get typingEvents => _typingEventsController.value!;
|
||||
List<User> get typingEvents => _typingEventsController.value;
|
||||
|
||||
/// Channel related typing users stream
|
||||
Stream<List<User>> get typingEventsStream => _typingEventsController.stream;
|
||||
|
||||
@@ -1495,7 +1495,7 @@ class ClientState {
|
||||
Stream<OwnUser?> get userStream => _userController.stream;
|
||||
|
||||
/// The current user
|
||||
Map<String?, User?> get users => _usersController.value!;
|
||||
Map<String?, User?> get users => _usersController.value;
|
||||
|
||||
/// The current user as a stream
|
||||
Stream<Map<String?, User?>> get usersStream => _usersController.stream;
|
||||
@@ -1517,7 +1517,7 @@ class ClientState {
|
||||
_channelsController.stream;
|
||||
|
||||
/// The current list of channels in memory
|
||||
Map<String, Channel> get channels => _channelsController.value!;
|
||||
Map<String, Channel> get channels => _channelsController.value;
|
||||
|
||||
set channels(Map<String, Channel> v) {
|
||||
_channelsController.add(v);
|
||||
|
||||
@@ -132,6 +132,8 @@ class ChannelListCoreState extends State<ChannelListCore> {
|
||||
stream: channelsBlocState.channelsStream,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) {
|
||||
print(snapshot.error);
|
||||
print(snapshot.stackTrace);
|
||||
return widget.errorBuilder(context, snapshot.error!);
|
||||
}
|
||||
if (!snapshot.hasData) {
|
||||
|
||||
@@ -71,7 +71,7 @@ class ChannelsBlocState extends State<ChannelsBloc>
|
||||
}
|
||||
|
||||
/// The current channel list
|
||||
List<Channel>? get channels => _channelsController.value;
|
||||
List<Channel>? get channels => _channelsController.valueOrNull;
|
||||
|
||||
/// The current channel list as a stream
|
||||
Stream<List<Channel>> get channelsStream => _channelsController.stream;
|
||||
@@ -128,7 +128,7 @@ class ChannelsBlocState extends State<ChannelsBloc>
|
||||
_channelsController.add(temp);
|
||||
}
|
||||
if (_channelsController.hasValue &&
|
||||
_queryChannelsLoadingController.value!) {
|
||||
_queryChannelsLoadingController.value) {
|
||||
_queryChannelsLoadingController.sink.add(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,8 +93,7 @@ class MessageSearchBlocState extends State<MessageSearchBloc>
|
||||
final temp = oldMessages + messages.results;
|
||||
_messageResponses.add(temp);
|
||||
}
|
||||
if (_messageResponses.hasValue &&
|
||||
_queryMessagesLoadingController.value!) {
|
||||
if (_messageResponses.hasValue && _queryMessagesLoadingController.value) {
|
||||
_queryMessagesLoadingController.add(false);
|
||||
}
|
||||
} catch (e, stk) {
|
||||
|
||||
@@ -92,7 +92,7 @@ class UsersBlocState extends State<UsersBloc>
|
||||
final temp = oldUsers + usersResponse.users;
|
||||
_usersController.add(temp);
|
||||
}
|
||||
if (_usersController.hasValue && _queryUsersLoadingController.value!) {
|
||||
if (_usersController.hasValue && _queryUsersLoadingController.value) {
|
||||
_queryUsersLoadingController.add(false);
|
||||
}
|
||||
} catch (e, stk) {
|
||||
|
||||
Reference in New Issue
Block a user