* 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>
* 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>
* 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**
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* feat: show the message "Congratulations, all pictures in this album have been either uploaded or marked as not for upload." in the custom picker when all images are either uploaded or marked.
* refactor: fix indentation in the code
* refactor: replace LiveData with StateFlow
* fix: fixed the bug that was causing one ImageFragment testcase to fail.
* fix: fixed the Congratulation message being shown for a brief moment while switching off the switch
* refactor: move hardcoded string to strings.xml.
* docs: add comment to clarify visibility logic in ImageFragment
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* fix: correctly handle permission callbacks on Main thread
The PermissionUtils was incorrectly executing permission callbacks on a background thread, leading to a Handler error. Now, it is using Main dispatcher.
* fix crash when opening camera while having partial storage access
* 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
This is a change that replicates the fix done via PR #6093.
This is based over v5.1.1 as the fix seems necessary for
the category search to work properly on the explore screen.
* MediaDetailFragment.kt: add helper method to retrieve ContributionFragment instance
Before this commit, there was no easy way to check for and retrieve the ContributionFragment instance that
was either the parent or grandparent (parent's parent) fragment. A complicated if check was required to
retrieve it.
After this commit, there is a simple helper method which will retrieve the ContributionFragment instance.
Existing code can now be replaced by calling this method.
* MediaDetailFragment.kt: replace code that is meant to hide nearby card
Before this commit, code would attempt to find and hide the nearby card that would appear
when the user was looking at media details. However, this code did not work.
After this commit, the old code has been replaced with code that correctly hides the
nearby card. Also, this new code uses a helper method call and is overall easier to read.
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* 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.
* 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
* Fixed logo getting cropped in landscape mode of login page
* Indentation added at line 12
* New Dimension created in dimens.xml which is used in land\activity_login.xml
* feat: Long-pressing a row in "Uploads" copies the caption to clipboard, and displays a snack saying "Caption copied to clipboard
* refactor: using string resources for the text instead of hard coded values
* 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
- Removed unused constants which were there in `Pref`
- Removed unused parameter requireActivity from `Setting Fragment`
Revert "chore : lint fix"
This reverts commit 599203343f4c3c050b45e4ccf53fd23097818cc4.
-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.