Skip to content

Commit

Permalink
fix crash where listeners are not removed when app quits (firebase#2650)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidongze91 authored Jul 2, 2020
1 parent 1891854 commit a2333ab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/cloud_firestore/cloud_firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.13.7+1

* Fix crash where listeners are not removed when app quits.

## 0.13.7

* Clean up snapshot listeners when Android Activity is destroyed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
}

private void onDetachedFromEngine() {
observers.clear();
documentObservers.clear();
batches.clear();
transactions.clear();
completionTasks.clear();
removeSnapshotListeners();
channel.setMethodCallHandler(null);
channel = null;
Expand Down
2 changes: 1 addition & 1 deletion packages/cloud_firestore/cloud_firestore/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description:
Flutter plugin for Cloud Firestore, a cloud-hosted, noSQL database with
live synchronization and offline support on Android and iOS.
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_firestore/cloud_firestore
version: 0.13.7
version: 0.13.7+1

flutter:
plugin:
Expand Down

0 comments on commit a2333ab

Please sign in to comment.