apps-android-commons/app/src/main/java/fr/free/nrw/commons
Saifuddin 54d0f65294 Refactor: Migrate to Room Database for Bookmark Locations
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.
2025-01-16 23:11:10 +05:30
..
actions Convert dependency inject ("di") package to kotlin (#5976) 2024-11-30 10:50:42 +09:00
activity Share login state with SingleWebViewActivity (#6136) 2025-01-16 17:49:09 +09:00
auth Rename Constants to Follow Kotlin Naming Conventions (#6107) 2025-01-07 03:00:02 +10:00
bookmarks Refactor: Migrate to Room Database for Bookmark Locations 2025-01-16 23:11:10 +05:30
campaigns Convert mwapi/wikidata to kotlin (part 1) (#5991) 2024-12-05 23:13:38 +09:00
category If depicted Wikidata item has no associated Commons category property, then suggest categories from its P18 (#6130) 2025-01-16 18:04:04 +09:00
concurrency Migrated concurrency module from Java to Kotiln (#6110) 2025-01-08 15:42:53 +09:00
contributions Fix NPE with UploadMediaDetails.captionText (#6128) 2025-01-15 22:52:35 +09:00
coordinates Refactor variable names to adhere to naming conventions (#6111) 2025-01-09 17:22:42 +09:00
customselector Refactor Dialog View Initialization with Null-Safe Calls (#6114) 2025-01-11 08:46:19 +09:00
data Refactor: Migrate to Room Database for Bookmark Locations 2025-01-16 23:11:10 +05:30
db Refactor: Migrate to Room Database for Bookmark Locations 2025-01-16 23:11:10 +05:30
delete make dialog modal (#6015) 2024-12-11 15:08:39 +09:00
description Fix NPE with UploadMediaDetails.captionText (#6128) 2025-01-15 22:52:35 +09:00
di Refactor: Migrate to Room Database for Bookmark Locations 2025-01-16 23:11:10 +05:30
edit Migrated exifInterface to androidx exif.interface (#6013) 2024-12-10 03:54:11 +10:00
explore add cancel button (#6078) 2024-12-29 08:20:32 +09:00
feedback add cancel button (#6078) 2024-12-29 08:20:32 +09:00
filepicker Convert upload to kotlin (part 2) (#6069) 2024-12-24 16:11:46 +09:00
fileusages Feature: Show where file is being used on Commons & Other wikis (#6006) 2024-12-09 23:07:44 +09:00
kvstore Migrate kvstore to kotlin (#5973) 2024-11-29 14:01:29 +09:00
language Migrate location and language module from Java to Kotlin (#5988) 2024-12-03 15:27:11 +09:00
location make dialog modal (#6015) 2024-12-11 15:08:39 +09:00
locationpicker Convert upload to kotlin (part 3) (#6104) 2025-01-13 23:04:09 +09:00
logging Replaces Log to Timber (#6062) 2024-12-22 14:44:57 +09:00
media Migrated Java profile package to kotlin (#6119) 2025-01-16 16:36:02 +09:00
mwapi Nearby: No longer keeps loading until timeout when map is zoomed out (#6070) 2024-12-24 15:21:45 +09:00
navtab add cancel button (#6078) 2024-12-29 08:20:32 +09:00
nearby Refactor: Migrate to Room Database for Bookmark Locations 2025-01-16 23:11:10 +05:30
notification Convert wikidata/mwapi to kotlin (part 3) (#6004) 2024-12-07 12:20:06 +09:00
profile Migrated Java profile package to kotlin (#6119) 2025-01-16 16:36:02 +09:00
quiz Refactor variable names to adhere to naming conventions (#6111) 2025-01-09 17:22:42 +09:00
recentlanguages Convert upload to kotlin (part 3) (#6104) 2025-01-13 23:04:09 +09:00
repository Convert upload to kotlin (part 3) (#6104) 2025-01-13 23:04:09 +09:00
review Refactor usage of Html.fromHtml to handle deprecation (#6074) 2024-12-25 00:44:25 +09:00
settings feat : Account Vanishing (#6098) 2025-01-09 23:27:08 +09:00
theme Migrated ui and theme modules from Java to Kotlin (#5942) 2024-11-20 22:55:13 +09:00
ui rm file (#6079) 2024-12-29 07:53:04 +09:00
upload If depicted Wikidata item has no associated Commons category property, then suggest categories from its P18 (#6130) 2025-01-16 18:04:04 +09:00
utils Convert upload to kotlin (part 3) (#6104) 2025-01-13 23:04:09 +09:00
widget Migrated widget module from Java to Kotlin (#5940) 2024-11-20 12:41:50 +09:00
wikidata fix null pointer exception (#6093) 2025-01-03 22:32:06 +10:00
AboutActivity.java make dialog modal (#6015) 2024-12-11 15:08:39 +09:00
BaseMarker.kt Partial fixes for errors and warnings reported by ./gradlew lint (#5885) 2024-10-27 22:59:09 +09:00
BasePresenter.java #3756 Convert SearchDepictionsFragment to use Pagination (#3758) 2020-05-28 14:10:04 +03:00
BetaConstants.kt Issue-5662-kotlinstyle (#5833) 2024-09-19 13:56:45 +09:00
CameraPosition.kt Issue-5662-kotlinstyle (#5833) 2024-09-19 13:56:45 +09:00
CommonsApplication.kt Refactor: Migrate to Room Database for Bookmark Locations 2025-01-16 23:11:10 +05:30
License.java Fix #2593: Migrate to androidX (#2594) 2019-03-16 11:22:37 +00:00
MapController.java Refactor curlatLng to currentLatLng (#5646) 2024-03-25 10:35:30 +09:00
Media.kt Partial fixes for errors and warnings reported by ./gradlew lint (#5885) 2024-10-27 22:59:09 +09:00
MediaDataExtractor.kt Issue-5662-kotlinstyle (#5833) 2024-09-19 13:56:45 +09:00
MvpView.java Show campaigns (#2113) 2018-12-15 02:55:53 +10:00
OkHttpConnectionFactory.java Fix Crash EditDescriptionActivity when switched dark/light mode (#5503) 2024-03-31 15:36:41 +09:00
Urls.kt Issue-5662-kotlinstyle (#5833) 2024-09-19 13:56:45 +09:00
Utils.java CodeCleanup : Removed Unused Import from packages. (#5609) 2024-03-08 23:21:27 +09:00
ViewHolder.java Refactored to move out nearby adapter from the activity 2017-04-02 22:21:05 +05:30
ViewPagerAdapter.java Remove duplicate ViewPagerAdapter (#4222) 2021-02-15 21:50:30 +09:00
WelcomeActivity.java make dialog modal (#6015) 2024-12-11 15:08:39 +09:00
WelcomePagerAdapter.java CodeCleanup : Removed Unused Import from packages. (#5609) 2024-03-08 23:21:27 +09:00