-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feat/ Dynamic search reciter #1351
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YassinNouh21
force-pushed
the
feat/dynamic-search-reciter
branch
from
October 3, 2024 08:02
ba42e46
to
9e67b0c
Compare
YassinNouh21
force-pushed
the
feat/dynamic-search-reciter
branch
from
October 11, 2024 18:24
e36ce42
to
2847eaf
Compare
* feat: add `kHafsQuranLocalVersion`, `kWarshQuranLocalVersion`, `kSelectedMoshafType` * feat: add `switchQuranType` localization * feat: Refactor Quran Download and Reading Logic - Introduced `MoshafType` as a parameter in various functions to support multiple Quran versions. - Updated `DownloadQuranLocalDataSource` to handle versioning based on `MoshafType`. - Enhanced `DownloadQuranState` with states for checking downloads and handling errors. - Refactored Notifiers and Repositories to include `MoshafType` in state management. - Improved the UI with a new `DownloadQuranDialog` for better user interaction during downloads. - Cleaned up redundant code and improved error handling across the application. * refactor * refactor: Quran Download and Reading Logic - Updated `download_quran_popup.dart` to streamline dialog handling and improve state management. - Changed `getLocalQuranVersion` in `quran_download_repository.dart` to return an `Option<String>` for better null safety. - Enhanced `download_quran_notifier.dart` for more efficient state transitions and error handling. - Refactored local data operations in `download_quran_local_data_source.dart` to utilize `Option` for version management. - Improved moshaf switching logic in `moshaf_type_notifier.dart` and related UI components. - Removed unnecessary dialog calls in `quran_reading_screen.dart` to prevent duplicate dialogs. * feat: add First-Time User Logic for Quran Moshaf Selection - Introduced `isFirstTime` property in `MoshafState` to track first-time usage. - Updated `download_quran_notifier.dart` to prompt downloads for first-time users. - Enhanced `moshaf_type_notifier.dart` to initialize `isFirstTime` from shared preferences. - Added `setNotFirstTime` method to update the state after the first download. - Defined a constant for first-time usage in `constants.dart`. * fix: download_quran_local and download_quran_remote unit tests * reformat * fix: auto focus node at the quran reading screen * fix focus at the reading * fix: solve focus issue * feat: add pop up for informing if download * fix: icon button for back and switch pages is not solid color at the focus mode * fix reformat * add surah selector * extract filter to seperate widget * fix conflicts & merge main branch * feat: add language_code in the constant file * refactor: Quran Surah Selector and State Management Changes: - Quran Surah Selector: - Added `Sizer` package for responsive font sizing. - Updated font size in `showSurahSelector` to use `sp` for scalable text. - Removed `StatefulBuilder` for simplification. - Added `autofocus` to the first item in the grid for improved accessibility. - Quran Reading Screen: - Adjusted top positioning of a widget for better layout. - Integrated `getAllSuwarPage` call before showing the surah selector to ensure data is loaded. - Quran Reading Notifier: - Replaced import for `quran_notifier`. - Removed unnecessary logging. - Added `getAllSuwarPage` method to update surah data based on language preference. * refactor: Introduced `getAllSuwarPage` and `getAllSuwar` methods to fetch surah data based on language settings. Changes: - QuranReadingNotifier: - Introduced `getAllSuwarPage` and `getAllSuwar` methods to fetch surah data based on language settings. - Optimized `_initState` to initialize state with surah and SVG data. - Enhanced `_getCurrentSurahName` with binary search for efficient surah name retrieval. - Cleaned up exception handling in `_saveLastReadPage`. * remove logs * reformat * refactor: change from `Positioned` into `Align` * feat: Add Auto-Scrolling to Surah Selector - Added `scroll_to_index` package for automatic scrolling. - Implemented `AutoScrollController` in the surah selector. - Automatically scrolls to the current surah. * fix formatting --------- Co-authored-by: Yassin <[email protected]>
* center mosque information widget * format code * remove expanded widget with flash message * refactor(footer): for improved readability and maintainability - Organized imports for clarity. - Simplified widget structure and logic. - Enhanced variable naming for better understanding. - Improved layout responsiveness with consistent sizing. - Reduced nested conditionals for cleaner code. * fix: formatting * fix: positing of logo and icon * fix: centering the info at the mosque * formatting --------- Co-authored-by: Yassin <[email protected]>
…separate the logic from the ui - Introduced a debounce mechanism for search query handling in `ReciteNotifier` to optimize reciter filtering. - Added filtered reciters and favorite reciters to the `ReciteState` for handling search results. - Updated `reciter_selection_screen.dart` to reflect changes in search query handling and debounce implementation. - Refactored UI elements in `reciter_selection_screen.dart` to work with filtered reciters. - Removed unused search-related focus node code to clean up the UI logic.
- Removed unused imports and initial focus index from `ReciterListView`. - Refactored `ReciterSelectionScreen` for better readability and structure. - Simplified tab bar implementation by removing redundant `PreferredSize`. - Introduced helper methods to clean up widget building logic. - Improved shimmer effect UI for loading reciters in both light and dark modes. - Enhanced search functionality with proper focus handling for empty results. - Updated reciter list and recite type grid view components for cleaner focus management."
YassinNouh21
approved these changes
Oct 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Summary
This PR fixes #1226
📝 Screenshots
20241002_123212.mp4
Checklist: