LooKeR ae2bdaea19
Refactor: Enhance AppDao query capabilities
This commit refactors the `AppDao` to provide more flexible and robust querying options for application data.

Key changes:

- **Renamed `_rawQueryAppEntities` to `_rawStreamAppEntities`**: This clarifies the function's purpose of returning a Flow of entities.
- **Added `_rawQueryAppEntities`**: A new suspend function that directly returns a List of entities, for non-streaming use cases.
- **Introduced `query` function**: A new public suspend function that mirrors the functionality of `stream` but returns a `List<AppEntity>` instead of a `Flow`.
- **Enhanced `searchQuery` private function**:
    - Now accepts lists for `categoriesToInclude`, `categoriesToExclude`, `antiFeaturesToInclude`, and `antiFeaturesToExclude` to allow filtering by multiple criteria.
    - Uses `DISTINCT` in the SQL query to avoid duplicate app entries.
    - Corrected join condition for `category_app_relation` from `app.id = category_app_relation.appId` to `app.id = category_app_relation.id`.
    - Corrected table name for anti-features from `anti_feature_app_relation` to `anti_features_app_relation`.
    - Improved SQL query construction for category and anti-feature filtering using `IN` and `NOT IN` clauses.
    - Ensured `ORDER BY` clause is always present, even if `searchQuery` is null.
    - Prefixed table names in `ORDER BY` clause (e.g., `app.lastUpdated`) for clarity and to avoid ambiguity.
- **Updated `stream` function**: Now utilizes the refactored `searchQuery` function and passes through all new filtering parameters.
- **Updated database schema**:
    - Changed `onDelete` action for the foreign key in the `authentication` table to `CASCADE`.
- **Updated Room tests**:
    - Simplified setup by removing legacy database initialization.
    - Added tests for new sorting and category filtering functionalities in `AppDao`.
2025-06-01 01:47:59 +05:30
2024-12-26 00:34:55 +05:30
2025-01-27 10:37:19 +05:30
2024-07-01 18:02:13 +05:30
2025-01-27 10:37:00 +05:30
2023-05-19 07:50:38 +05:30
2024-06-25 01:20:31 -07:00
2023-10-07 17:09:06 +05:30
2023-08-17 13:37:54 +05:30

Droid-ify

Github Stars Github License Github Downloads Github Latest FDroid Latest

Features

  • Material & Clean design
  • Fast repository syncing
  • Smooth user experience
  • Feature-rich

Screenshots

Building and Installing

  1. Install Android Studio:

    • Download and install Android Studio on your computer if you haven't already.
  2. Clone the Repository:

    • Open Android Studio and select "Project from Version Control."
    • Paste the link to this repository to clone it to your local machine.
  3. Build the APK:

    • In Android Studio, navigate to Build > APK.
    • Select "Create New Keystore" and enter the required information, including a password.
    • Wait for the build process to finish.

TODO

  • Add support for index-v2
  • Add detekt code-analysis
  • Add GitHub Repo feature

Contribution

  • Pick any issue you would like to resolve
  • Fork the project
  • Open a Pull Request
  • Your PR will undergo review

Translations

Translation status

License

Droid-ify

Copyright (C) 2023 LooKeR
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Languages
Kotlin 99.7%
Shell 0.3%