Skip to content

refactor: remove redundant notifyListeners in HomeViewModel deleteBooking#2839

Open
harshyadavDeveloper wants to merge 1 commit intoflutter:mainfrom
harshyadavDeveloper:fix-deletebooking-notifylisteners
Open

refactor: remove redundant notifyListeners in HomeViewModel deleteBooking#2839
harshyadavDeveloper wants to merge 1 commit intoflutter:mainfrom
harshyadavDeveloper:fix-deletebooking-notifylisteners

Conversation

@harshyadavDeveloper
Copy link
Copy Markdown

Removes redundant notifyListeners() call from _deleteBooking().

The method is executed through Command, which already manages its own
notifyListeners lifecycle. This change ensures that HomeViewModel
only notifies listeners when its internal state (_bookings) changes,
avoiding unnecessary updates.

Fixes #2746

Pre-launch Checklist

  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I have added sample code updates to the changelog.
  • I updated/added relevant documentation (doc comments with ///).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compass app] Unnecessary notifyListeners() in _deleteBooking() callback

1 participant