Commit graph

6543 commits

Author SHA1 Message Date
translatewiki.net
77bad3380c
Localisation updates from https://translatewiki.net. 2025-01-23 13:01:40 +01:00
translatewiki.net
3570377678
Localisation updates from https://translatewiki.net. 2025-01-20 13:01:41 +01:00
Akshay Komar
d4ababc0a5
Refactor: Rename Constants to Follow CamelCase Naming Convention (#6126)
* 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>
2025-01-18 23:06:52 +09:00
yuvraj-coder1
1c6ebafb29
feat: show the proper message in the custom picker when all images are either uploaded or marked. (#6095)
* 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>
2025-01-18 23:04:28 +09:00
Sujal
23e1f01783
fix/handle-shared-files-and-error-handling (#6141) 2025-01-18 03:19:16 +10:00
Tanmay Gupta
ef032b0f93
Disable vanishing option when logged out (#6135) 2025-01-18 03:19:00 +10:00
Yusuke Matsubara
35a2fe87db
Use variant-dependent variable to make URLs for vanishing (#6117) 2025-01-17 17:33:50 +09:00
Rohit Verma
9f1fe8737f
Fix crash when opening in-app Camera for the very first time (#6139)
* 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
2025-01-17 15:37:07 +09:00
translatewiki.net
2d6583fea6
Localisation updates from https://translatewiki.net. 2025-01-16 13:01:53 +01:00
Tanmay Gupta
1e64acdf1d
If depicted Wikidata item has no associated Commons category property, then suggest categories from its P18 (#6130)
* 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
2025-01-16 18:04:04 +09:00
Tanmay Gupta
1f33926ed5
Share login state with SingleWebViewActivity (#6136) 2025-01-16 17:49:09 +09:00
Ifeoluwa Andrew Omole
16ac08fe21
change status bar color to grey in dark mode (#6120)
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2025-01-16 17:41:37 +09:00
Sujal
70291a0cb2
Migrated Java profile package to kotlin (#6119)
* Rename .java to .kt

* Migrate Profile Package to Kotlin #6118 #5928

* Migrate Profile Package to Kotlin #6118 #5928

* Migrate Profile Package to Kotlin #6118 #5928
2025-01-16 16:36:02 +09:00
Tanmay Gupta
62136b5b09
Fix NPE with UploadMediaDetails.captionText (#6128)
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2025-01-15 22:52:35 +09:00
Kaartic Sivaraam
76078cf3b5 Merge remote-tracking branch 'origin/v5.1.0' 2025-01-15 12:52:36 +05:30
Kaartic Sivaraam
be0b1db193 Version v5.1.2 2025-01-15 12:50:53 +05:30
Kaartic Sivaraam
a796a8adcf category: fix category search in explore
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.
2025-01-15 12:32:50 +05:30
Kaartic Sivaraam
efc9ae8fb6 Merge remote-tracking branch 'origin/v5.1.0' 2025-01-15 11:53:59 +05:30
Jason-Whitmore
d4a9bacd91
Fixes Issue #5832: Navigation Banner Appears in Media Details Screen (#6121)
* 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>
2025-01-14 08:17:14 +09:00
Paul Hawke
0e735512bb
Convert upload to kotlin (part 3) (#6104)
* Convert UploadCategoriesFragment to kotlin

* Convert UploadBaseFragment to kotlin

* Convert UploadItem to kotlin

* Convert UploadModel to kotlin

* Convert UploadMediaDetailAdapter to kotlin

* Convert UploadActivity to kotlin

* Convert UploadMediaPresenter to kotlin

* Convert UploadMediaDetailFragment to kotlin

* Fix NPE that broke uploads
2025-01-13 23:04:09 +09:00
translatewiki.net
6d64357d45
Localisation updates from https://translatewiki.net. 2025-01-13 13:01:48 +01:00
Akshay Komar
78666ccbde
Refactor Dialog View Initialization with Null-Safe Calls (#6114)
* 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.
2025-01-11 08:46:19 +09:00
Neel Doshi
39b513da12
feat : Account Vanishing (#6098)
* feat : Account Vanishing

* Added Comment for SingleWebViewActivity

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2025-01-09 23:27:08 +09:00
translatewiki.net
18f599b554
Localisation updates from https://translatewiki.net. 2025-01-09 13:01:40 +01:00
Akshay Komar
3e7565c7e3
Refactor variable names to adhere to naming conventions (#6111)
* 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
2025-01-09 17:22:42 +09:00
Saifuddin Adenwala
87a453cb72
Migrated concurrency module from Java to Kotiln (#6110)
* Rename .java to .kt

* Migrated concurrency module to Kotlin
2025-01-08 15:42:53 +09:00
Nachiket Jadhav
fdbe504ca9
fix: logo getting cropped in landscape mode of login page (#6106)
* 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
2025-01-08 05:33:41 +10:00
yuvraj-coder1
b2159ed87f
feat: Long-pressing a row in "Uploads" copies the caption to clipboard, and displays a snack saying "Caption copied to clipboard" (#6105)
* 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
2025-01-07 07:12:24 +10:00
Akshay Komar
ecb19d6984
Rename Constants to Follow Kotlin Naming Conventions (#6107)
* 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
2025-01-07 03:00:02 +10:00
translatewiki.net
940c0740b0
Localisation updates from https://translatewiki.net. 2025-01-06 13:01:38 +01:00
Neel Doshi
cebe1c2a1f
chore : lint fix (#6099)
- Removed unused constants which were there in `Pref`
- Removed unused parameter requireActivity from `Setting Fragment`

Revert "chore : lint fix"

This reverts commit 599203343f4c3c050b45e4ccf53fd23097818cc4.
2025-01-06 02:48:05 +10:00
Paul Hawke
1d8d1d6b03
Remove the extra byte buffer copying while creating file chunks (#6091)
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2025-01-05 20:44:30 +09:00
Akshay Komar
25e467b3a5
Refactor Nearby Location Tests to Improve Assertion Logic (#6103)
-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.
2025-01-05 17:21:17 +09:00
Parneet Singh
038ae9acd4
fix null pointer exception (#6093)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2025-01-03 22:32:06 +10:00
translatewiki.net
ea20a64b34
Localisation updates from https://translatewiki.net. 2025-01-02 13:01:43 +01:00
Tanmay Gupta
411184fde8
Nearby: Fixed recenter and legend FABs inconsistencies (#6092)
Using app:useCompatPadding=true on both the FABs caused padding issues, replaced that with android:layout_margin. As the minimumSdk version is >=lollipop, I believe useCompatPadding is not required.
2025-01-02 15:09:18 +09:00
translatewiki.net
bf89f11606
Localisation updates from https://translatewiki.net. 2024-12-30 13:01:44 +01:00
Kaartic Sivaraam
391408ed17 CHANGELOG: fix some typos 2024-12-29 22:43:21 +05:30
Kaartic Sivaraam
9bbb1a98db Version 5.1.1 2024-12-29 22:36:39 +05:30
Sujal
faa58a19de
Fixed bug #5876 (#6086) 2024-12-29 16:09:03 +09:00
Tanmay Gupta
d2751595cb
Nearby: Markers now show place via pin base (#6090) 2024-12-29 15:46:29 +09:00
Gautham Mohanraj
46cefa4899
Fix/feedback to map navigation (#6087)
* feat:Added try catch block for the Feedback

* fix:Added finish after the feedback submitted so that we navigate back to the map
2024-12-29 11:03:47 +09:00
Tanmay Gupta
5bc58284aa
Nearby: Avoid reloading entire map upon cache clear (#6089) 2024-12-29 10:44:47 +09:00
Parneet Singh
a6444968fa
add cancel button (#6078)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2024-12-29 08:20:32 +09:00
Parneet Singh
dec56a3342
rm file (#6079)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2024-12-29 07:53:04 +09:00
Parneet Singh
91e41c4c18 Always show upload icon (#6022)
* fix issue5847 as owner required: make the icon always visible and just adjust the count accordingly,comment the setVisibility method and make pending_upload_icon always visible

* set pending_upload_icon android visible level: visible and tool visible level: gone

* fix issue 5847, The upload icon is now set to always be visible, while the original code has been commented out and retained with a note for potential re-use in the future.

* refactor

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>

---------

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
Co-authored-by: bxy379987 <bxy379987@gmail.com>
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-28 23:55:27 +05:30
Neel Doshi
b714b45bfd Migrated exifInterface to androidx exif.interface (#6013) 2024-12-28 23:43:26 +05:30
Parneet Singh
22238f55cd
fix parsing (#6075)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2024-12-27 01:27:03 +10:00
Sonal Yadav
4244373a5d
Refactor focus change listener to improve readability and avoid crashes (#6080) 2024-12-27 01:26:08 +10:00
Tanmay Gupta
75ca96a526
Nearby: show cached pins even when internet is unavailable (fixes #6051) (#6081)
* Place: Made location @Embedded

* Nearby: Move handling map scroll to presenter

* PlacesRepository: Add methods for fetching places in geo bounds

* Nearby: add getScreenTopRight/BottomLeft and refactor old code

* PlacesRepository: Add methods for fetching places in map bounds

* Nearby: Complete offline pins implementation

* Nearby offline pins: Add snackbar message

* Nearby offline pins: Add javadoc

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-26 23:55:21 +09:00