mawaqit / android-tv-app

Prayer times App for Android TV
https://mawaqit.net
Other
34 stars 15 forks source link

fix: handle adhan audio cutting off for Fajr prayer #1104

Closed YassinNouh21 closed 2 months ago

YassinNouh21 commented 2 months ago

πŸ“ Summary

Handles the issue of adhan audio cutting off in the middle for Fajr prayer

This solve issue: #1100

Description

This PR addresses the issue where the adhan audio was cutting off in the middle during the Fajr prayer. It introduces the following changes:

  1. In AdhanSubScreen.dart, a flag isFajrPray is added to check if the current salah index is 0 (Fajr prayer). The getAdhanDuration function is called with this flag to determine the appropriate duration.

  2. In salah_workflow.dart, the isFajrPray flag is also used when calling getAdhanDuration to calculate the adhanEndTime.

  3. In audio_mixin.dart, the getAdhanDuration function is modified to handle the Fajr prayer case. If the isFajrPray flag is true and the adhanName is not null, the '-fajr' suffix is appended to the adhanName.

Tests

πŸ§ͺ Use case 1

πŸ’¬ Description: Test the Fajr prayer adhan playback to ensure the audio does not cut off in the middle.

πŸ“· Screenshots or GIFs (if applicable): [Provide any relevant screenshots or GIFs demonstrating the successful test case]

Checklist: