THIS IS SUPPOSED TO FAIL AT THE MOMENT.
Documentation for all the strings is already written
in translatewiki (see #6457), but not yet imported into GitHub,
so it's supposed to fail now, which is good because you shouldn't trust
tests that never failed :)
Once all the documentation strings are imported, this pull request
should be rebased, and then it's supposed to pass.
The extra string in values-qq/string.xml is also there
just to check that it fails as it should, and will be removed.
Resolves#6485.
* Add braces to conditions.
* Remove an unnecessary semicolon.
* Remove an unnecessary constructor.
This fixes all the Java lint errors of these types.
* test:add mock JSON resource files for campaigns API responses
* feat:make campaign model fields mutable to allow for correct deserialization
* test:implement unit tests for fetching campaigns and fix DTO mocking logic
* test:implement unit tests for fetching campaigns and fix DTO mocking logic
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
All these messages are not really necessary because
the app has its own localizations, and android.R.string
sometimes doesn't display the localized string.
Resolves#6470.
* Prevent IndexOutOfBoundsException in setUploadMediaDetails by validating index and list size (#6404)
* fixed UninitializedPropertyAccessException by safely initializing and accessing imageAdapter (#6404)
* fixed indexOutOfBoundsException by safely handling saved state and index in onViewCreated (#6404)
* resolve Unresolved reference by replacing setImageToBeUploaded with direct field assignments (#6404)
* Fix test compilation by removing obsolete testSetImageToBeUploaded and adding tha testInitializeFragmentWithUploadItem (#6404)
* Fix test compilation by removing testInitializeFragmentWithUploadItem with unresolved onImageProcessed (#6404)
* fix: test failures in UploadMediaDetailFragmentUnitTest by removing obsolete tests and initializing defaultKvStore (#6404)
* Fixed all the typos
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Convert WikidataItemDetailsActivity to kotlin
* Convert RecentSearchesDao to kotlin
* Convert RecentSearchesFragment to kotlin
* Convert ExploreListRootFragment to kotlin
* Convert the ParentViewPager to kotlin
* Convert ExploreMapRootFragment to kotlin
* Convert SearchActivity to kotlin
* Convert ExploreFragment to kotlin
* Convert ExploreMapCalls and ExploreMapContract to kotlin
* Convert ExploreMapController to kotlin
* Convert the map presenter to kotlin
* Convert the ExploreMapFragment to kotlin
* Fix import issue
* Convert BookmarkItemsController to kotlin
* Split BookmarkItemsDao apart and converted to Kotlin
* Convert and cleanup content providers
* Convert BookmarkItemsFragment to kotlin
* Convert BookmarkPicturesFragment to kotlin
* Convert BookmarkPicturesDao to kotlin and share some useful DB methods
* Convert BookmarkPicturesController to kotlin
* Convert BookmarkFragment to kotlin
* Convert BookmarksPagerAdapter to kotlin
* Convert BookmarkListRootFragment to kotlin
* Convert Caption to kotlin
* Convert CaptionListViewAdapter to kotlin
* Convert CaptionListViewAdapter to kotlin
* Removed unused class
* Converted MwParseResult / MwParseResponse to kotlin
* Convert CustomOkHttpNetworkFetcher to kotlin
* Break up MediaDetailPagerFragment to make it easier to convert to kotlin
* Convert MediaDetailProvider to kotlin
* Convert the MediaDetailAdapter to kotlin
* Convert MediaDetailPagerFragment to kotlin
* Converted welcome activity / pager to kotlin
* Removed unused interface
* Convert ViewPagerAdapter to kotlin and enforce that all tabs must have a title that comes from strings.xml
* Convert OkHttpConnectionFactory and remove an exception class nobody was using
* Convert MapController to kotlin along with fixing nullability in a few places
* Unused class removed
* Convert BasePresenter to kotlin
* Removed redundent class
* Move the Utils class into the utils package
* Inline the creation of a page title object
* Move license utilities into their own file
* Inline app rating since its only ever used in 1 place
* Moved GeoCoordinates utilities into their own class
* Moved Monuments related utils into their own class
* Moved screen capture into its own util class
* Moved handleWebUrl to its own utility class
* Moved fixExtension to its own class
* Moved clipboard copy into its own utility class
* Renames class to match remaining utility method
* Convert UnderlineUtils to kotlin
* Converted the copy-to-clipboard utility to kotlin
* Converted license name and url lookup to kotlin
* Converted fixExtension to kotlin
* Convert handleGeoCoordinates to kotlin
* Monument utils converted to kotlin
* Convert then inline screeen capture in kotlin
* Convert handleWebUrl to kotlin
* fix: infinite loading progress bar after nominating for deletion
* add logs for testing
* refactor: use globalFileUsage instead of achievement to append in reason
Fetching achievements is a time consuming operation and globalFileUsage gives the similar result in optimal time
* test(ReasonBuilder): fix tests according to new behavior
* refactor: remove logs added for testing
* test: await for async getReason method call
---------
Co-authored-by: Neel Doshi <neeldoshi147@gmail.com>
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
replace deprecated onBackPressed with onBackPressedCallback
remove unit test for deprecated onBackPressed method
remove if-check before deleting picture to prevent hiding top thumbnail card
hide the thumbnail card on fragments other than MediaDetailFragment
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Rename .java to .kt
* Refactor: Migrate bookmark location logic to Kotlin
This commit migrates the bookmark location logic to Kotlin, enhancing code maintainability and readability.
- Removes the `BookmarkLocationsContentProvider`, `BookmarkLocationsController`, and `BookmarkLocationsDao` Java classes.
- Creates `BookmarkLocationsDao.kt` and `BookmarkLocationsContentProvider.kt` in Kotlin.
- Migrates the logic from `BookmarkLocationsFragment.java` to `BookmarkLocationsFragment.kt`.
- Updates test files to reflect these changes.
- Addresses associated code review comments.
* 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.
* Refactor: Improve bookmark location handling and update database version
This commit includes the following changes:
- Updates the database version to 20.
- Refactors bookmark location handling within `NearbyParentFragment` to improve logic and efficiency.
- Introduces `getBookmarkLocationExists` in `NearbyUtil` to directly update bookmark icons in the bottom sheet adapter.
- Removes unused provider.
- Adjusts `BookmarkLocationsFragment`'s `PlaceAdapter` to use `lifecycleScope` for better coroutine management.
- Refactors `updateBookmarkLocation` in `NearbyParentFragmentPresenter`.
* Toggle bookmark icon in BottomSheetAdapter instead of finding the location each time in the bookmark
* Update bookmark button image in `BottomSheetAdapter`
* Add new toggle function to `BottomSheetAdapter`
* Call the toggle function in `NearbyParentFragment`
* Refactor: Load bookmarked locations using Flow
* `BookmarkLocationsController`: Changed to use `Flow` to load bookmarked locations.
* `BookmarkLocationsDao`: Changed to return `Flow` of bookmark location instead of a list.
* `BookmarkLocationsFragment`: Used `LifecycleScope` to collect data from flow and display it.
* Removed unused `getAllBookmarkLocations()` from `BookmarkLocationsViewModel`.
* Used `map` in `BookmarkLocationsDao` to convert from `BookmarksLocations` to `Place` list.
* Loading locations data in fragment
* BookmarkLocationsController: Changed `loadFavoritesLocations` to be a suspend function.
* BookmarkLocationsFragment: Updated the `initList` function to call the controller's suspend function.
* BookmarkLocationsDao: Changed `getAllBookmarksLocations` and `getAllBookmarksLocationsPlace` to be suspend functions.
* Refactor BookmarkLocationControllerTest and related files to use coroutines
* Migrated `bookmarkDao!!.getAllBookmarksLocations()` to `bookmarkDao!!.getAllBookmarksLocationsPlace()` and added `runBlocking`
* Added `runBlocking` for `loadBookmarkedLocations()` and `testInitNonEmpty()`
* Added `runBlocking` for `getAllBookmarksLocations()` and update `updateMapMarkers`
These changes improve the test structure by ensuring the database functions are executed within a coroutine context.
* Refactor BookmarkLocationsFragment and add tests for BookmarkLocationsDao
* Moved `initList` to `BookmarkLocationsFragment` for better lifecycle handling.
* Added test case for `BookmarkLocationsFragment`'s onResume.
* Added test cases for `BookmarkLocationsDao` operations like adding, retrieving, finding, deleting and updating bookmarks.
* Refactor BookmarkLocationsFragment to load favorites only when view is not null
* BookmarkLocationsFragment: load favorites locations only when view is not null.
* BookmarkLocationsFragmentTest: added spy and verify to test onResume() call initList() method.
* Refactor database and add migration
* `AppDatabase`: Updated to use room migration.
* `CommonsApplicationModule`: added migration from version 19 to 20 to `appDatabase`
* Rename .java to .kt
* Refactor: Migrate bookmark location logic to Kotlin
This commit migrates the bookmark location logic to Kotlin, enhancing code maintainability and readability.
- Removes the `BookmarkLocationsContentProvider`, `BookmarkLocationsController`, and `BookmarkLocationsDao` Java classes.
- Creates `BookmarkLocationsDao.kt` and `BookmarkLocationsContentProvider.kt` in Kotlin.
- Migrates the logic from `BookmarkLocationsFragment.java` to `BookmarkLocationsFragment.kt`.
- Updates test files to reflect these changes.
- Addresses associated code review comments.
* 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.
* Refactor: Improve bookmark location handling and update database version
This commit includes the following changes:
- Updates the database version to 20.
- Refactors bookmark location handling within `NearbyParentFragment` to improve logic and efficiency.
- Introduces `getBookmarkLocationExists` in `NearbyUtil` to directly update bookmark icons in the bottom sheet adapter.
- Removes unused provider.
- Adjusts `BookmarkLocationsFragment`'s `PlaceAdapter` to use `lifecycleScope` for better coroutine management.
- Refactors `updateBookmarkLocation` in `NearbyParentFragmentPresenter`.
* Toggle bookmark icon in BottomSheetAdapter instead of finding the location each time in the bookmark
* Update bookmark button image in `BottomSheetAdapter`
* Add new toggle function to `BottomSheetAdapter`
* Call the toggle function in `NearbyParentFragment`
* Refactor: Load bookmarked locations using Flow
* `BookmarkLocationsController`: Changed to use `Flow` to load bookmarked locations.
* `BookmarkLocationsDao`: Changed to return `Flow` of bookmark location instead of a list.
* `BookmarkLocationsFragment`: Used `LifecycleScope` to collect data from flow and display it.
* Removed unused `getAllBookmarkLocations()` from `BookmarkLocationsViewModel`.
* Used `map` in `BookmarkLocationsDao` to convert from `BookmarksLocations` to `Place` list.
* Loading locations data in fragment
* BookmarkLocationsController: Changed `loadFavoritesLocations` to be a suspend function.
* BookmarkLocationsFragment: Updated the `initList` function to call the controller's suspend function.
* BookmarkLocationsDao: Changed `getAllBookmarksLocations` and `getAllBookmarksLocationsPlace` to be suspend functions.
* Refactor BookmarkLocationControllerTest and related files to use coroutines
* Migrated `bookmarkDao!!.getAllBookmarksLocations()` to `bookmarkDao!!.getAllBookmarksLocationsPlace()` and added `runBlocking`
* Added `runBlocking` for `loadBookmarkedLocations()` and `testInitNonEmpty()`
* Added `runBlocking` for `getAllBookmarksLocations()` and update `updateMapMarkers`
These changes improve the test structure by ensuring the database functions are executed within a coroutine context.
* Refactor BookmarkLocationsFragment and add tests for BookmarkLocationsDao
* Moved `initList` to `BookmarkLocationsFragment` for better lifecycle handling.
* Added test case for `BookmarkLocationsFragment`'s onResume.
* Added test cases for `BookmarkLocationsDao` operations like adding, retrieving, finding, deleting and updating bookmarks.
* Refactor BookmarkLocationsFragment to load favorites only when view is not null
* BookmarkLocationsFragment: load favorites locations only when view is not null.
* BookmarkLocationsFragmentTest: added spy and verify to test onResume() call initList() method.
* Refactor database and add migration
* `AppDatabase`: Updated to use room migration.
* `CommonsApplicationModule`: added migration from version 19 to 20 to `appDatabase`
* Resolve conflicts and attach the `commons.db` with `common_room.db` during the migration to persist the data
* Refactor database migration to handle null values and use direct insertion
* Modify the database migration from version 19 to 20 to properly handle null values and use direct data insertion.
* Create a new table `bookmarks_locations` with `NOT NULL` constraints.
* Directly insert data into the new table from old database, safely handling `NULL` values by using `DEFAULT` empty string value.
* Close old database cursor and the database connection.
* Drop the old `bookmarksLocations` table.
* Refactor database schema to delete `bookmarksLocations` table and migrate data
* Delete `bookmarksLocations` table from the database during schema upgrade
* Migrate data from `bookmarksLocations` to `bookmarks_locations` in new schema
* Add `INSERT OR REPLACE` to prevent duplication during migration
* Delete `CONTRIBUTIONS_TABLE` and `BOOKMARKS_LOCATIONS` in the application start-up to have a fresh DB for first start-up after update
* Update sqlite-based database version to 22.
* Update sqlite-based database version to 22.
* Refactor CommonsApplicationModule to utilize application context
* Initialize and use application context directly
* Utilize lateinit for application context
* Added line breaks for improved readability.
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Rename .java to .kt
* Migrated ContributionController
* Rename .java to .kt
* Migrated ContributionDao
* Rename .java to .kt
* Migrated ContributionsContract,ContributionFragment,ContributionListAdapter,ContributionsListContract from java to Kotlin
* Rename .java to .kt
* converted/Migrated
* converted/Migrated
* Rename .java to .kt
* Migrated ContributionController
* Rename .java to .kt
* Migrated ContributionDao
* Rename .java to .kt
* Migrated ContributionsContract,ContributionFragment,ContributionListAdapter,ContributionsListContract from java to Kotlin
* Rename .java to .kt
* Show placeholder and display depiction section when no depictions are available (#6163) (#6165)
* corrected
* corrected
* Update MediaDetailFragment.kt
Spelling correction
* Migrated AboutActivity from Java to Kotlin (#6158)
* Rename Constants to Follow Kotlin Naming Conventions
>This PR refactors constant names in the project to adhere to Kotlin's UPPERCASE_SNAKE_CASE naming convention, improving code readability and maintaining consistency across the codebase.
>Renamed the following constants in LoginActivity:
>saveProgressDialog → SAVE_PROGRESS_DIALOG
>saveErrorMessage → SAVE_ERROR_MESSAGE
>saveUsername → SAVE_USERNAME
>savePassword → SAVE_PASSWORD
>Updated all references to these constants throughout the project.
* Update Project_Default.xml
* Refactor variable names to adhere to naming conventions
Renamed variables to use camel case:
-UPLOAD_COUNT_THRESHOLD → uploadCountThreshold
-REVERT_PERCENTAGE_FOR_MESSAGE → revertPercentageForMessage
-REVERT_SHARED_PREFERENCE → revertSharedPreference
-UPLOAD_SHARED_PREFERENCE → uploadSharedPreference
Renamed variables with uppercase initials to lowercase for alignment with Kotlin conventions:
-Latitude → latitude
-Longitude → longitude
-Accuracy → accuracy
Refactored the following variable names:
-NUMBER_OF_QUESTIONS → numberOfQuestions
-MULTIPLIER_TO_GET_PERCENTAGE → multiplierToGetPercentage
* Refactor Dialog View Initialization with Null-Safe Calls
This PR refactors the dialog setup code in CustomSelectorActivity to improve safety and readability by replacing explicit casts with null-safe generic calls for findViewById.
>Replaced explicit casting (as Button and as TextView) with the generic findViewById<T>() method for improved type safety.
>Added null-safety (?.) to avoid potential crashes if a view is not found in the dialog layout.
why changed:-
>Prevents runtime crashes caused by NullPointerException when a view is missing in the layout.
* Refactor Unit Test: Replace Unsafe Casting with Type-Safe Mocking for findViewById
>PR refactors the unit test for NearbyParentFragment by replacing unsafe casting in the findViewById mocking statements with type-safe
>Ensured all findViewById mocks now use a consistent, type-safe format (findViewById<View>(...)) to reduce verbosity and potential casting errors.
>Verified the functionality of prepareViewsForSheetPosition remains unchanged, ensuring no regression in test behavior.
* Update NearbyParentFragmentUnitTest.kt
* Refactor: Rename Constants to Follow CamelCase Naming Convention
>Updated all constant variable names to follow the camelCase naming convention, removing underscores in the middle or end.
>Ensured variable names remain descriptive and align with code readability best practices.
* Replace private val with const val for URL constants in QuizController
* Renaming the constant to use UPPER_SNAKE_CASE
* Renaming the constant to use UPPER_SNAKE_CASE
* Update Done
* **Refactor: Convert `minimumThresholdForSwipe` to a compile-time constant**
* Convert AboutActivity from Java to Kotlin
This PR converts the AboutActivity class from Java to Kotlin
>Testing:
>Verified all functionalities of the AboutActivity, including toolbar setup, intent launches, and dialog interactions, to ensure behavior remains consistent post-conversion.
>Successfully ran unit tests for AboutActivity to confirm the correctness of methods and logic.
* Thank you for the suggestion! Since these methods all take a single View parameter, replacing them with method references is a great way to simplify the code and improve readability. I'll updated the code accordingly. Added a TODO in the code as a reminder to refactor this in the future.
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Localisation updates from https://translatewiki.net.
* Feat: Make it smoother to switch between nearby and explore maps (#6164)
* Nearby: Add 'Show in Explore' 3-dots menu item
* MainActivity: Add methods to pass extras between Nearby and Explore
* MainActivity: Extend loadFragment() to support passing fragment arguments
* Nearby: Add ability to navigate to Explore fragment on 'Show in Explore' click
* Explore: Read fragment arguments for Nearby map data and update Explore map if present
* Explore: Add 'Show in Nearby' 3-dots menu item. Only visible when Map tab is selected
* Explore: On 'Show in Nearby' click, navigate to Nearby fragment, passing map data as fragment args
* Nearby: Read fragment arguments for Explore map data and update Nearby map if present
* MainActivity: Fix memory leaks when navigating between bottom nav destinations
* Explore: Fix crashes caused by unattached map fragment
* Refactor code to pass unit tests
* Explore: Format javadocs
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Localisation updates from https://translatewiki.net.
* enhance spammy category filter (#6167)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
* Localisation updates from https://translatewiki.net.
* correction
* correction
* correction
* GitHub workflow to build betaDebug (#6174)
* [Bug fix] Check if duplicate exist using both original and modified file's checksum (#6169)
* check original file's SHA too along with modified one
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
* fix tests
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
---------
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
* Add multiline input for caption and description (#6173)
* allow multiple lines for description/caption
* make caption multiline too
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* correction
---------
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
Co-authored-by: Akshay Komar <146421342+Akshaykomar890@users.noreply.github.com>
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
Co-authored-by: translatewiki.net <l10n-bot@translatewiki.net>
Co-authored-by: Ifeoluwa Andrew Omole <iomole3@gmail.com>
Co-authored-by: Parneet Singh <111801812+parneet-guraya@users.noreply.github.com>
Co-authored-by: Matija Nalis <mnalis-git@voyager.hr>
* check original file's SHA too along with modified one
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
* fix tests
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
---------
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
* Nearby: Add 'Show in Explore' 3-dots menu item
* MainActivity: Add methods to pass extras between Nearby and Explore
* MainActivity: Extend loadFragment() to support passing fragment arguments
* Nearby: Add ability to navigate to Explore fragment on 'Show in Explore' click
* Explore: Read fragment arguments for Nearby map data and update Explore map if present
* Explore: Add 'Show in Nearby' 3-dots menu item. Only visible when Map tab is selected
* Explore: On 'Show in Nearby' click, navigate to Nearby fragment, passing map data as fragment args
* Nearby: Read fragment arguments for Explore map data and update Nearby map if present
* MainActivity: Fix memory leaks when navigating between bottom nav destinations
* Explore: Fix crashes caused by unattached map fragment
* Refactor code to pass unit tests
* Explore: Format javadocs
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Fix NPE with UploadMediaDetails.captionText
* Store P18 instead of processed image url in DepictedItem
* Add routes for fetching category info from titles
* Consider depict's P18 when suggesting categories
* Add tests
* Corrected DepictedItem constructor arguments
* Add test for DepictedItem::primaryImage
-Refactored testSearchCloseToCurrentLocationWhenFar: Simplified assertion by using assertFalse(!isClose) for better readability and logical clarity.
-Added testSearchCloseToCurrentLocationWhenClose: Created a new test case to validate behavior when the search is close to the current location, ensuring assertTrue(isClose) for correctness.
-Improved Coverage: These changes enhance the test coverage and reliability of the searchCloseToCurrentLocation function.
* Convert UploadCategoriesFragment to kotlin
* Convert DepictsFragment to kotlin
* Convert MediaLicensePresenter to kotlin
* Convert MediaLicenseFragment to kotlin
* Converted SimilarImageDialogFragment to kotlin
* Convert ThumbnailsAdapter to kotlin
* Convert UploadPresenter to kotlin
* Convert UploadBaseFragment to kotlin
* Convert UploadMediaDetailInputFilter to kotlin
* Convert UploadItem to kotlin
* Convert UploadController to kotlin
* Fix nullability of the UploadItem
* Nearby: Search for actual map center
* Add query syntax and methods
* Nearby: Added binary search for loading pins
* Add NearbyQueryParams and refactor
* Add unit tests and complete implementation
* Nearby: Increase max radius from 100km to 300km
* Nearby: Centermost pins now appear on top
* getNearbyItemCount: Added javadoc
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* temporary fixes part one
* temporary fixes part two
* temporary fixes part three
* temporary fixes part four
* temporary fixes part five
* reformatting
* remove code no longer in use
* Migrate NearbyParentFragmentPresenter to Kotlin
* Partially replace temporary experimental fixes
* Replace temporary experimental fixes part 2
* Replace temporary experimental fixes part 3
* Replace temporary fixes completely
* Fix caching and loading places in Nearby list
* Add place bookmarking logic, Remove all old code
* Nearby Presenter: Close channel properly
* Nearby pins now load starting from the center
Fixes#6049
* Add comments and javadoc for Nearby Presenter
* Fix warnings, Fix formatting, Add javadoc
* Pass unit tests
* Convert upload dagger module to kotlin
* Code cleanup and convert the upload contract to kotlin
* Code cleanup and convert CategoriesContract to kotlin
* Code cleanup and convert MediaLicenseContract to kotlin
* Code cleanup and convert UploadMediaDetailsContract to kotlin
* Code cleanup, fixed nullability and converted DepictsContract to kotlin
* Removed unused class
* Convert FileMetadataUtils to kotlin
* Convert EXIFReader to kotlin
* Convert FileUtils to kotlin
* Convert FileUtilsWrapper to kotlin
* Convert ImageProcessingService to kotlin
* Convert PageContentsCreator to kotlin
* Convert PendingUploadsPresenter and contract to Kotlin with some code-cleanup
* Convert ReadFBMD to kotlin
* Convert SimilarImageInterface to kotlin
* Removed unused classes
* Fix merge/rebase issue
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Rename .java to .kt
* Migrated delete and description module to kotlin (WIP)
* Fix: Unit tests
* Fix: Unit tests
* Rename .java to .kt
* Migrated data, db, and converter module to kotlin
* Fix: Unit tests
* Fix: Unit tests
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Convert ImageDetails to kotlin
* Convert MwException/MwServiceError to kotlin
* Convert ListUserResponse to kotlin
* Convert MwPostResponse to kotlin
* Convert MwQueryResponse to kotlin
* Convert MwQueryResult to kotlin
* Convert MwQueryPage to kotlin
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Rename `.java` to `.kt`
* Migrated FeedbackContentCreator to kotlin
* Rename FeedbackDialog from `java` to `kt`
* Migrated Feedback Dialog from `java` to `kt`
* Renamed OnFeedbackSubmitCallback to kotlij
* Migrated OnFeedbackSubmitCallback to kotlin
* Fixed: TestCase Failure
* Fixed Test : Changed Private Modifier to Public
* Suppressed deprecated and added TODO for lint
* Linked Deprecation with Github Issue
* Rename Feedback from java to kt
* Migrated Feedback Data Class to Kotlin
* Modified the data class to var for mutuability
* Convert Edit to kotlin along with deleting unused class
* Converted ExtMetadata to kotlin
* Convert ImageInfo to kotlin
* Removed unused class
* Convert Notification to kotlin
* Convert PageProperties to kotlin
* Convert PageTitle to kotlin
* Convert Namespace to kotlin
* Rename AchievementFragment from `.java` to `.kt`
* Migrated AchievementFragment to kotlin
* Revamped Achievement Screen
* fixed AchievementFragment Unit Test
* fixed Level on MoreBottomSheetFragment
* Implemented Badge and Minor Code Refactor
* Fixed the badge issue & made the badge clickable
* Removed Redundant XML Code & Converted badges to green color and added values inside it
* Fixed : showSnackBarWithRetry Test
* Fixed : Theme issues on Light Mode
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Rename .java to .kt
* Migrated filepicker module from Java to Kotlin
* Rename .java to .kt
* Migrated filepicker module from Java to Kotlin
* fix: test cases
* Convert OkHttpJsonApiClient and CategoryApi to kotlin
* Convert GsonUtil to kotlin
* Convert WikidataConstants to kotlin
* Convert WikidataEditListener to kotlin
* Convert WikidataEditService to kotlin
* work in progress
* Convert RequiredFieldsCheckOnReadTypeAdapterFactory to kotlin
* Converted type adapters
* Convert WikiSiteTypeAdapter to kotlin
* Fixed nullability
* Convert ViewModelFactory to kotlin
* Convert UpdateAvatarResponse and related test to Kotlin
* Convert LeaderboardResponse and related test to kotlin
* Convert LeaderboardListAdapter to kotlin
* Convert UserDetailAdapter to kotlin
* Convert LeaderboardListViewModel to kotlin
* Convert DataSourceClass to kotlin
* Convert the LeaderboardFragment to kotlin
* Converted AchievementsFragment to kotlin
* Revert "Converted AchievementsFragment to kotlin"
This reverts commit 4fcbb81e5d.
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Convert a batch of easier modules
* Convert the NetworkingModule to kotlin
* Converted the ApplicationlessInjection to kotlin
* Convert CommonsDaggerAppCompatActivity to kotlin
* Convert CommonsDaggerContentProvider to kotlin
* Convert CommonsDaggerIntentService to kotlin
* Convert CommonsDaggerService to kotlin
* Convert CommonsDaggerSupportFragment to kotlin
* Convert CommonsDaggerBroadcastReceiver to kotlin
* Convert CommonsApplicationModule to kotlin
* Fix imports and make them consistent
* Get good test around the basic KvStore before starting conversion
* Converted BasicKvStore to kotlin and removed dead code
* Converted JsonKvStore to kotlin
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Convert ICampaignsView to kotlin along with simple fix
* Convert CampaignView to Kotlin
* Convert CampaignsPresenter to Kotlin
* Convert CampaignsPresenter to kotlin
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Convert SessionManager to kotlin along with other small fixes
* Convert WikiAccountAuthenticator to kotlin
* Migrate WikiAccountAuthenticatorService to kotlin
* Converted AccountUtil to kotlin
* Convert SignupActivity to kotlin
* Convert LoginActivity to kotlin
* Merge from main
* move createLocale() method to companion object and add test dependency
* use mockk() from Mockk library for mocking sealed classes
* change method parameter to null-able String type
* add null check for accessing property from unit tests
* change method signature to match old method's signature
It fixes the NullPointerException when running ImageProcessingUnitTest
* Fix unresolved references and make properties public for unit tests
* fix tests in UploadRepositoryUnitTest by making return type null-able