performance fixes
This commit is contained in:
@@ -1709,7 +1709,7 @@ class ChannelClientState {
|
||||
final BehaviorSubject<int> _unreadCountController = BehaviorSubject.seeded(0);
|
||||
|
||||
/// Unread count getter as a stream
|
||||
Stream<int> get unreadCountStream => _unreadCountController.stream;
|
||||
Stream<int> get unreadCountStream => _unreadCountController.stream.distinct();
|
||||
|
||||
/// Unread count getter
|
||||
int? get unreadCount => _unreadCountController.value;
|
||||
|
||||
@@ -1532,13 +1532,15 @@ class ClientState {
|
||||
int? get unreadChannels => _unreadChannelsController.valueOrNull;
|
||||
|
||||
/// The current unread channels count as a stream
|
||||
Stream<int?> get unreadChannelsStream => _unreadChannelsController.stream;
|
||||
Stream<int?> get unreadChannelsStream =>
|
||||
_unreadChannelsController.stream.distinct();
|
||||
|
||||
/// The current total unread messages count
|
||||
int? get totalUnreadCount => _totalUnreadCountController.valueOrNull;
|
||||
|
||||
/// The current total unread messages count as a stream
|
||||
Stream<int?> get totalUnreadCountStream => _totalUnreadCountController.stream;
|
||||
Stream<int?> get totalUnreadCountStream =>
|
||||
_totalUnreadCountController.stream.distinct();
|
||||
|
||||
/// The current list of channels in memory as a stream
|
||||
Stream<Map<String?, Channel>?> get channelsStream =>
|
||||
|
||||
Reference in New Issue
Block a user