Skip to content

Commit c058613

Browse files
authored
fix: docs not loading after first scroll (#29)
1 parent 1ee79f3 commit c058613

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

example/windows/flutter/generated_plugin_registrant.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
#include "generated_plugin_registrant.h"
88

9+
#include <cloud_firestore/cloud_firestore_plugin_c_api.h>
10+
#include <firebase_core/firebase_core_plugin_c_api.h>
911

1012
void RegisterPlugins(flutter::PluginRegistry* registry) {
13+
CloudFirestorePluginCApiRegisterWithRegistrar(
14+
registry->GetRegistrarForPlugin("CloudFirestorePluginCApi"));
15+
FirebaseCorePluginCApiRegisterWithRegistrar(
16+
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
1117
}

example/windows/flutter/generated_plugins.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#
44

55
list(APPEND FLUTTER_PLUGIN_LIST
6+
cloud_firestore
7+
firebase_core
68
)
79

810
list(APPEND FLUTTER_FFI_PLUGIN_LIST

lib/src/firestore_pagination.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class _FirestorePaginationState extends State<FirestorePagination> {
206206
);
207207

208208
_isFetching = false;
209-
if (!_isEnded && !isDocRemoved) {
209+
if (!isDocRemoved) {
210210
_isEnded = snapshot.docs.length < docsLimit;
211211
}
212212

lib/src/realtime_db_pagination.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class _RealtimeDBPaginationState extends State<RealtimeDBPagination> {
224224
final isDataRemoved = snapshot.type == DatabaseEventType.childRemoved;
225225

226226
_isFetching = false;
227-
if (!_isEnded && !isDataRemoved) {
227+
if (!isDataRemoved) {
228228
_isEnded = snapshot.snapshot.children.length < docsLimit;
229229
}
230230

0 commit comments

Comments
 (0)