Skip to content

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

Merged
MarkisDev merged 1 commit intoCCExtractor:mainfrom
dorodb-web22:fix-getLatestAlarm-branch-logic
Apr 19, 2026
Merged

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

Conversation

@dorodb-web22
Copy link
Copy Markdown
Contributor

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

@MarkisDev MarkisDev merged commit 5307a44 into CCExtractor:main Apr 19, 2026
1 check passed
NihalDR pushed a commit to NihalDR/ultimate_alarm_clock that referenced this pull request Apr 20, 2026
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

2 participants