Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement indexOf using realm_list_find #911

Merged
merged 15 commits into from
Sep 21, 2022
Merged

Implement indexOf using realm_list_find #911

merged 15 commits into from
Sep 21, 2022

Conversation

nielsenko
Copy link
Contributor

@nielsenko nielsenko commented Sep 15, 2022

Fixes #910

@cla-bot cla-bot bot added the cla: yes label Sep 15, 2022
@nielsenko nielsenko self-assigned this Sep 15, 2022
Copy link
Member

@nirinchev nirinchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, two minor things from me.

test/list_test.dart Outdated Show resolved Hide resolved
test/list_test.dart Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Sep 15, 2022

Pull Request Test Coverage Report for Build 3097300398

  • 15 of 15 (100.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+5.5%) to 93.128%

Files with Coverage Reduction New Missed Lines %
lib/src/list.dart 1 87.63%
Totals Coverage Status
Change from base Build 3090791388: 5.5%
Covered Lines: 393
Relevant Lines: 422

💛 - Coveralls

Copy link
Contributor

@blagoev blagoev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to move the throwing of the Error in a more obvious place. Now it's really indirect which makes the validation logic hard to follow

CHANGELOG.md Outdated Show resolved Hide resolved
test/list_test.dart Outdated Show resolved Hide resolved
lib/src/realm_object.dart Outdated Show resolved Hide resolved
test/list_test.dart Outdated Show resolved Hide resolved
@nielsenko nielsenko force-pushed the kn/list-index-of branch 2 times, most recently from 79a8161 to f5794dc Compare September 19, 2022 07:38
@nielsenko nielsenko requested a review from blagoev September 19, 2022 07:45
Copy link
Contributor

@blagoev blagoev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets handle the comments about the place where we throw the RealmStateError

@desistefanova desistefanova self-requested a review September 20, 2022 07:57
Copy link
Contributor

@desistefanova desistefanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be sure to be merged with core [v12.7.0] coming with PR Fix list query bug before to push into master.

@nielsenko
Copy link
Contributor Author

Be sure to be merged with core [v12.7.0] coming with PR Fix list query bug before to push into master.

Sure

@nielsenko
Copy link
Contributor Author

Lets handle the comments about the place where we throw the RealmStateError

Done

realm.write(() => realm.add(team));
final players = team.players;

// expect(players, isA<ManagedRealmList<Person>>());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete it if not needed.

Copy link
Contributor

@blagoev blagoev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should let the null error bubble up and crash the app every time.

lib/src/realm_object.dart Outdated Show resolved Hide resolved
@nielsenko nielsenko requested a review from blagoev September 21, 2022 10:35
@nielsenko nielsenko merged commit e80758f into master Sep 21, 2022
@nielsenko nielsenko deleted the kn/list-index-of branch September 21, 2022 12:49
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support list indexOf
5 participants