firebase / FirebaseUI-Flutter

Apache License 2.0
92 stars 79 forks source link

fix(firebase_ui_database): Perform list operations in correct order #213

Closed Rexios80 closed 5 months ago

Rexios80 commented 6 months ago

Description

Fix for bug introduced by #193

The elements should be reversed before removing the extra element or else the wrong element is removed

Related Issues

N/A

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

Rexios80 commented 5 months ago

@rrousselGit @lesnitsky Can we get this merged? This is a pretty important issue that affects the currently released package.

russellwheatley commented 5 months ago

Hey @Rexios80 - sorry for the late response, I had this on my radar but I wanted to write firebase_ui_database tests. They have just been merged, is it possible that you could write a test that validates the change? At the moment, our CI is broken on apple CI due to an external dependency that we're in the process of fixing. It will work locally. Here are the tests: https://github.com/firebase/FirebaseUI-Flutter/blob/main/tests/integration_test/firebase_ui_database/database_list_view_test.dart

You will need to run firebase emulators:start in root of project and run flutter test integration_test/firebase_ui_test.dart. Also worth commeting out tests you don't need to run for speed here: https://github.com/firebase/FirebaseUI-Flutter/blob/main/tests/integration_test/firebase_ui_test.dart#L26-L36

Thanks 👍

Rexios80 commented 5 months ago

@russellwheatley I wrote the test

russellwheatley commented 5 months ago

@Rexios80 - thanks, I will look to get this merged/released this week 👍