Skip to content

fix(FirestoreDb): correct getLatestAlarm else branch to use current minute without offset#881

Open
dorodb-web22 wants to merge 1 commit intoCCExtractor:mainfrom
dorodb-web22:fix-getLatestAlarm-branch-logic
Open

fix(FirestoreDb): correct getLatestAlarm else branch to use current minute without offset#881
dorodb-web22 wants to merge 1 commit intoCCExtractor:mainfrom
dorodb-web22:fix-getLatestAlarm-branch-logic

Conversation

@dorodb-web22
Copy link

Description

Fixes #880
As noted in the issue, the else branch of getLatestAlarm inside firestore_provider.dart was an identical copy of the if branch (both added + 1 to the current minute). This caused wantNextAlarm = false to behave exactly like wantNextAlarm = true.

Proposed Changes

Removed the + 1 from the else branch. This logic now correctly matches the Isar provider's implementation of the same method.

Screenshots

N/A

Checklist

  • Tests have been added or updated to cover the changes
  • Documentation has been updated to reflect the changes
  • Code follows the established coding style guidelines
  • All tests are passing

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.

Bug: Duplicate branch logic in getLatestAlarm (Firestore provider) makes wantNextAlarm flag useless

1 participant