mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Commons app mirror
androidcommonsgood-first-issuegsochacktoberfesthelp-wantedjavakotlinkotlin-androidphotographywikimediawikimedia-apiwikimedia-commons
This commit migrates the bookmark locations functionality from a custom content provider to Room database.
Key changes:
* **Removal of `BookmarkLocationsContentProvider`:** This class, which previously handled data storage, has been removed.
* **Introduction of `BookmarksLocations`:** This data class now represents a bookmarked location, serving as the Room entity.
* **Creation of `BookmarkLocationsDao`:** This Room DAO handles database interactions for bookmark locations, including:
* Adding, deleting, and querying bookmarked locations.
* Checking if a location is already bookmarked.
* Updating the bookmark status of a location.
* Retrieving all bookmarked locations as `Place` objects.
* **`BookmarkLocationsViewModel`:** Added to manage the data layer for bookmark locations
* **`NearbyUtil`:** Created a Util class for Nearby to manage the bookmark locations.
* **Updates in `PlaceAdapter` and `PlaceAdapterDelegate`:** These classes have been modified to work with the new Room-based data layer.
* **Updates in `AppDatabase`:** The database now includes `BookmarksLocations` as an entity and exposes the `bookmarkLocationsDao`.
* **Updates in `FragmentBuilderModule` and `CommonsApplicationModule`**: for DI
* **Removal of `DBOpenHelper` upgrade for locations**: as it is no longer needed
* **Updates in `NearbyParentFragmentPresenter`**: refactored the logic to use the dao functions
* **Updates in `NearbyParentFragment`**: refactored the logic to use the util and dao functions
* **Update in `BookmarkLocationsController`**: removed as its no longer needed
* **Add `toPlace` and `toBookmarksLocations`**: extension functions to map between data class and entities
* **Update in `CommonsApplication`**: to remove old db table.
|
||
|---|---|---|
| .github | ||
| .idea | ||
| app | ||
| design | ||
| fastlane/metadata/android/en-US/images | ||
| gradle/wrapper | ||
| update-license-info | ||
| .gitignore | ||
| .mailmap | ||
| build.gradle | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| COPYING | ||
| CREDITS | ||
| dependency-injection.md | ||
| find-broken-strings-variables.sh | ||
| gitutils.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| jacoco.gradle | ||
| nr-commons.keystore.enc | ||
| play.p12.enc | ||
| README.md | ||
| RELEASE-CHECKLIST.md | ||
| settings.gradle | ||
| sign.sh | ||
Wikimedia Commons Android app
The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons. Download the app here, or view our website.
Initially started by the Wikimedia Foundation, this app is now maintained by grantees and volunteers of the Wikimedia community. Anyone is welcome to improve it, just choose among the open issues and send us a pull request! :-)
Documentation
Our documentation repository contains extensive documentation for users, contributors, and developers alike:
Contributors
Thank you all for your work!
.. and many more.
License
This software is open source, licensed under the Apache License 2.0.