Skip to content

Commit

Permalink
Fix/third jumua section portrait (#1509)
Browse files Browse the repository at this point in the history
* fix: Improve Quran Download and Navigation Experience (#1452)

* fix: Ensure correct Moshaf type (Hafs) is displayed after download

* fix: display Hafs Quran correctly and remove success dialog

- Set Hafs as default Moshaf type if none is selected.
- Auto-dismiss success dialog on download completion.
- Improved state invalidation for Quran reading updates.
- Added FocusNode for better dialog interaction.
- Optimized resource management with keepAlive and link.close().

* fix: improve Quran Download and Navigation Experience

- Redirect user to Quran reading screen automatically after successful download and extraction of Quran (Hafs).
- Remove the unnecessary "OK" button to confirm Quran download completion, streamlining the user experience.
- Enhance state management for download-related UI in `quran_reading_screen.dart` to handle various download states (needed, downloading, extracting).
- Update `download_quran_popup.dart` to ensure proper navigation based on the user's first-time download experience.
- Improve error handling and loading indicators for a smoother and more intuitive flow.

* fix formating

* Update pubspec.yaml

* fix: Resolve overlapping and focus issues for Back and Switch buttons (#1457)

* fix: Resolve pop-up issue when selecting Listening mode (#1455)

- updated `_handleNavigation` method in `quran_mode_selection_screen.dart` to use `async/await` for ensuring proper completion of Quran mode selection before navigation.
- fixed unexpected pop-ups by adjusting the handling of the `moshafType` state in `download_quran_popup.dart`.
- improved navigation flow for both Reading and Listening modes, ensuring seamless user experience.

Co-authored-by: Ghassen Ben Zahra <ghassen.benzahra@gmail.com>

* Update pubspec.yaml

* fix merger conflict'

* fix layout third jumua for portrait mode

* format code

* fix force staging value

---------

Co-authored-by: Yassin Nouh <70436855+YassinNouh21@users.noreply.github.com>
Co-authored-by: Ibrahim ZEHHAF <97339607+ibrahim-zehhaf-mawaqit@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 6, 2025
1 parent e984080 commit 472e738
Showing 1 changed file with 95 additions and 35 deletions.
130 changes: 95 additions & 35 deletions lib/src/pages/home/widgets/salah_items/SalahItem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ class SalahItemWidget extends StatelessOrientationWidget {

final mosqueProvider = context.watch<MosqueManager>();
final mosqueConfig = mosqueProvider.mosqueConfig;
// print(isIqamaEnabled);
final isArabic = context.read<AppLanguage>().isArabic();

final is12period = mosqueConfig?.timeDisplayFormat == "12";

return Container(
Expand Down Expand Up @@ -217,39 +215,101 @@ class SalahItemWidget extends StatelessOrientationWidget {
),
),
SizedBox(height: 0.5.vh),
if (time.trim().isEmpty)
Icon(Icons.dnd_forwardslash, size: 6.vwr)
else
TimeWidget.fromString(
show24hFormat: !is12period,
time: time,
style: TextStyle(
fontSize: isIqamaMoreImportant ? smallFont : bigFont,
fontWeight: FontWeight.w700,
shadows: kHomeTextShadow,
color: Colors.white,
// fontFamily: StringManager.getFontFamily(context),
),
),
if (iqama != null && showIqama)
SizedBox(
height: isArabic ? 1.5.vr : 1.3.vwr,
child: Divider(
thickness: 1,
color: withDivider ? Colors.white : Colors.transparent,
),
),
if (iqama != null && showIqama)
TimeWidget.fromString(
show24hFormat: !is12period,
time: iqama!,
style: TextStyle(
fontSize: isIqamaMoreImportant ? bigFont : smallFont,
fontWeight: FontWeight.bold,
shadows: kHomeTextShadow,
letterSpacing: 1,
color: Colors.white,
),
if (iqama2 != null) // Three times layout
Column(
children: [
if (time.trim().isEmpty)
Icon(Icons.dnd_forwardslash, size: 6.vwr)
else
TimeWidget.fromString(
show24hFormat: !is12period,
time: time,
style: TextStyle(
fontSize: bigFont,
fontWeight: FontWeight.w700,
shadows: kHomeTextShadow,
color: Colors.white,
height: 1,
),
),
Container(
margin: EdgeInsets.symmetric(vertical: 1.vr),
width: 20.vwr,
height: 1,
color: Colors.white,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TimeWidget.fromString(
show24hFormat: !is12period,
time: iqama!,
style: TextStyle(
fontSize: smallFont,
fontWeight: FontWeight.w700,
shadows: kHomeTextShadow,
color: Colors.white,
height: 1,
),
),
Container(
height: bigFont,
width: 1,
margin: EdgeInsets.symmetric(horizontal: 1.vwr),
color: Colors.white,
),
TimeWidget.fromString(
show24hFormat: !is12period,
time: iqama2!,
style: TextStyle(
fontSize: smallFont,
fontWeight: FontWeight.w700,
shadows: kHomeTextShadow,
color: Colors.white,
height: 1,
),
),
],
),
],
)
else // Original two times layout
Column(
children: [
if (time.trim().isEmpty)
Icon(Icons.dnd_forwardslash, size: 6.vwr)
else
TimeWidget.fromString(
show24hFormat: !is12period,
time: time,
style: TextStyle(
fontSize: isIqamaMoreImportant ? smallFont : bigFont,
fontWeight: FontWeight.w700,
shadows: kHomeTextShadow,
color: Colors.white,
),
),
if (iqama != null && showIqama)
SizedBox(
height: isArabic ? 1.5.vr : 1.3.vwr,
child: Divider(
thickness: 1,
color: withDivider ? Colors.white : Colors.transparent,
),
),
if (iqama != null && showIqama)
TimeWidget.fromString(
show24hFormat: !is12period,
time: iqama!,
style: TextStyle(
fontSize: isIqamaMoreImportant ? bigFont : smallFont,
fontWeight: FontWeight.bold,
shadows: kHomeTextShadow,
letterSpacing: 1,
color: Colors.white,
),
),
],
),
],
),
Expand Down

0 comments on commit 472e738

Please sign in to comment.