fix rebase
This commit is contained in:
@@ -36,7 +36,7 @@ class Channel {
|
||||
_id = channelState.channel!.id,
|
||||
_type = channelState.channel!.type,
|
||||
_cid = channelState.channel!.cid,
|
||||
_extraData = channelState.channel!.extraData ?? {} {
|
||||
_extraData = channelState.channel!.extraData {
|
||||
state = ChannelClientState(this, channelState);
|
||||
_initializedCompleter.complete(true);
|
||||
_client.logger.info('New Channel instance initialized created');
|
||||
@@ -204,8 +204,7 @@ class Channel {
|
||||
/// Channel extra data as a stream
|
||||
Stream<Map<String, dynamic>> get extraDataStream {
|
||||
_checkInitialized();
|
||||
return state!.channelStateStream
|
||||
.map(
|
||||
return state!.channelStateStream.map(
|
||||
(cs) => cs.channel?.extraData ?? _extraData,
|
||||
);
|
||||
}
|
||||
@@ -574,7 +573,7 @@ class Channel {
|
||||
/// A message search.
|
||||
Future<SearchMessagesResponse> search({
|
||||
String? query,
|
||||
Map<String, dynamic>? messageFilters,
|
||||
Filter? messageFilters,
|
||||
List<SortOption>? sort,
|
||||
PaginationParams? paginationParams,
|
||||
}) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import 'package:stream_chat/src/models/attachment_file.dart';
|
||||
import 'package:stream_chat/src/models/channel_model.dart';
|
||||
import 'package:stream_chat/src/models/channel_state.dart';
|
||||
import 'package:stream_chat/src/models/event.dart';
|
||||
import 'package:stream_chat/src/models/filter.dart';
|
||||
import 'package:stream_chat/src/models/message.dart';
|
||||
import 'package:stream_chat/src/models/own_user.dart';
|
||||
import 'package:stream_chat/src/models/user.dart';
|
||||
@@ -29,8 +30,6 @@ import 'package:stream_chat/src/platform_detector/platform_detector.dart';
|
||||
import 'package:stream_chat/version.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import 'package:stream_chat/src/models/filter.dart';
|
||||
|
||||
/// Handler function used for logging records. Function requires a single
|
||||
/// [LogRecord] as the only parameter.
|
||||
typedef LogHandlerFunction = void Function(LogRecord record);
|
||||
@@ -1067,7 +1066,7 @@ class StreamChatClient {
|
||||
String? query,
|
||||
List<SortOption>? sort,
|
||||
PaginationParams? paginationParams,
|
||||
Map<String, dynamic>? messageFilters,
|
||||
Filter? messageFilters,
|
||||
}) async {
|
||||
assert(() {
|
||||
if (query == null && messageFilters == null) {
|
||||
@@ -1516,7 +1515,7 @@ class ClientState {
|
||||
Map<String, Channel> get channels => _channelsController.value!;
|
||||
|
||||
set channels(Map<String, Channel> v) {
|
||||
if (v != null) _channelsController.add(v);
|
||||
_channelsController.add(v);
|
||||
}
|
||||
|
||||
final BehaviorSubject<Map<String, Channel>> _channelsController =
|
||||
|
||||
@@ -85,7 +85,7 @@ class ChannelListView extends StatefulWidget {
|
||||
/// The query filters to use.
|
||||
/// You can query on any of the custom fields you've defined on the [Channel].
|
||||
/// You can also filter other built-in channel fields.
|
||||
final Filter filter;
|
||||
final Filter? filter;
|
||||
|
||||
/// Query channels options.
|
||||
///
|
||||
|
||||
@@ -92,7 +92,7 @@ class MessageSearchListView extends StatefulWidget {
|
||||
/// The message query filters to use.
|
||||
/// You can query on any of the custom fields you've defined on the [Channel].
|
||||
/// You can also filter other built-in channel fields.
|
||||
final Map<String, dynamic>? messageFilters;
|
||||
final Filter? messageFilters;
|
||||
|
||||
/// Builder used to create a custom item preview
|
||||
final MessageSearchItemBuilder? itemBuilder;
|
||||
|
||||
@@ -59,7 +59,7 @@ class MessageSearchBlocState extends State<MessageSearchBloc>
|
||||
/// [messagesStream] and [queryMessagesLoading] stream
|
||||
Future<void> search({
|
||||
required Filter filter,
|
||||
Map<String, dynamic>? messageFilter,
|
||||
Filter? messageFilter,
|
||||
List<SortOption>? sort,
|
||||
String? query,
|
||||
PaginationParams? pagination,
|
||||
|
||||
@@ -85,7 +85,7 @@ class MessageSearchListCore extends StatefulWidget {
|
||||
/// The message query filters to use.
|
||||
/// You can query on any of the custom fields you've defined on the [Channel].
|
||||
/// You can also filter other built-in channel fields.
|
||||
final Map<String, dynamic>? messageFilters;
|
||||
final Filter? messageFilters;
|
||||
|
||||
/// The builder that is used when the search messages are fetched
|
||||
final Widget Function(List<GetMessageResponse>) childBuilder;
|
||||
|
||||
Reference in New Issue
Block a user