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

Incorrect Next Prayer Indication After Midnight #1403

Closed
YassinNouh21 opened this issue Nov 3, 2024 · 1 comment · Fixed by #1476 or #1512
Closed

Incorrect Next Prayer Indication After Midnight #1403

YassinNouh21 opened this issue Nov 3, 2024 · 1 comment · Fixed by #1476 or #1512
Assignees
Labels
bug Something isn't working
Milestone

Comments

@YassinNouh21
Copy link
Contributor

Description:
The app incorrectly indicates Fajr as the next prayer when it should show Isha for times after midnight. This occurs specifically in the following scenario:

Current time: 00:45
Isha time: 01:00 (next day)
System incorrectly shows: "Fajr in 04:14"
Expected behavior: Should show "Isha in 00:15"

Root cause:
The issue appears to be in the time comparison logic that doesn't properly handle prayer times crossing over midnight into the next day. The nextSalahIndex() method in mosque_helpers_mixins.dart needs to be updated to handle this edge case.

Suggested fix:
Modify the time comparison logic in nextSalahIndex() to:

  1. Handle Isha prayers that occur after midnight
  2. Compare against the correct day's prayer times when near midnight
  3. Consider adding a special case for the period between midnight and Isha

image

@ibrahim-zehhaf-mawaqit
Copy link
Contributor

ibrahim-zehhaf-mawaqit commented Dec 20, 2024

Countdown is not correct

IMG_4718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants