Merge branch 'fix/message-search-pagination' of github.com:GetStream/stream-chat-flutter into add-pagination-ended
This commit is contained in:
@@ -105,8 +105,8 @@ class ChannelsBlocState extends State<ChannelsBloc>
|
||||
}) async {
|
||||
final client = _streamChatCoreState!.client;
|
||||
|
||||
final clear =
|
||||
paginationParams.offset == null || paginationParams.offset == 0;
|
||||
final offset = paginationParams.offset;
|
||||
final clear = offset == null || offset == 0;
|
||||
if (clear && _paginationEnded) {
|
||||
_paginationEnded = false;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class MessageSearchListCore extends StatefulWidget {
|
||||
/// * [errorBuilder]
|
||||
/// * [loadingBuilder]
|
||||
/// * [childBuilder]
|
||||
MessageSearchListCore({
|
||||
const MessageSearchListCore({
|
||||
Key? key,
|
||||
required this.emptyBuilder,
|
||||
required this.errorBuilder,
|
||||
@@ -58,12 +58,6 @@ class MessageSearchListCore extends StatefulWidget {
|
||||
messageQuery == null || messageFilters == null,
|
||||
"Can't provide both `query` and `messageFilters` at the same time",
|
||||
),
|
||||
assert(
|
||||
paginationParams.offset == null ||
|
||||
paginationParams.offset == 0 ||
|
||||
sortOptions == null,
|
||||
'Cannot specify `offset` with `sortOptions` parameter',
|
||||
),
|
||||
super(key: key);
|
||||
|
||||
/// A [MessageSearchListController] allows reloading and pagination.
|
||||
|
||||
@@ -70,7 +70,8 @@ class UsersBlocState extends State<UsersBloc>
|
||||
}) async {
|
||||
final client = _streamChatCore.client;
|
||||
|
||||
final clear = pagination.offset == null || pagination.offset == 0;
|
||||
final offset = pagination.offset;
|
||||
final clear = offset == null || offset == 0;
|
||||
|
||||
if (clear && _paginationEnded) {
|
||||
_paginationEnded = false;
|
||||
|
||||
Reference in New Issue
Block a user