Commit graph

6589 commits

Author SHA1 Message Date
Tanmay Gupta
369e79be5e
Nearby: No longer keeps loading until timeout when map is zoomed out (#6070)
* 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>
2024-12-24 15:21:45 +09:00
translatewiki.net
c963cd9ea4
Localisation updates from https://translatewiki.net. 2024-12-23 13:02:14 +01:00
Sonal Yadav
7479767266
Fix: Allow back button functionality to dismiss language selection dialog (#6067)
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-23 20:38:45 +09:00
Sonal Yadav
b55c61ddb8
Fixed the migrations warning under Kotlin header #13282 (#6060)
* Fixed  Migration warnings under Kotlin header

* suppresses Lint

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-22 23:14:20 +09:00
Neel Doshi
f1e8e48769
Removed deneme8 Timber tag (#6065) 2024-12-22 22:05:25 +09:00
Neel Doshi
d0bde4a3fe
Replaces Log to Timber (#6062) 2024-12-22 14:44:57 +09:00
Tanmay Gupta
6a32454347
Nearby: Fix map moving by itself (#6061)
fixes #6046

the OnFocusChangeListener for nearby place list items sometimes gets invoked when new items aer set, even when the list is hidden, if an item had previously been clicked in it. This in turn causes the onItemClick to be called. This commit adds a check to make sure the list is not hidden when onItemClick is invoked this way.
2024-12-22 08:39:30 +09:00
Tanmay Gupta
4dd16054ca
Nearby: Fix disappearing of pins loaded from cache (#6052) (#6057)
* Nearby Fix disappearing of pins loaded from cache

Fixes #6052

* Remove outdated tests

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-21 20:10:33 +09:00
Mohit Kambli
4b152fc15f
Fix #6054: Rename SAVEPROGRESSDAILOG to SAVEPROGRESSDIALOG (#6058) 2024-12-21 19:55:51 +09:00
Tanmay Gupta
c891c2b0df
Nearby: Fix race condition and lag when loading pin details, faster overlay management (#6047)
* 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
2024-12-20 22:30:53 +10:00
Parneet Singh
70b4f78a5d
fix multi-line paste (#6050)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2024-12-20 22:29:08 +10:00
Parneet Singh
4c9637c821
Add pull down to refresh in Contributions screen (#6041)
* pull down to refresh

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

* add kdoc

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

* only enabled for self user

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

* fix test

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

---------

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2024-12-20 10:06:07 +09:00
translatewiki.net
a4b74794cb
Localisation updates from https://translatewiki.net. 2024-12-19 13:01:57 +01:00
Parneet Singh
5500b03976
Feature: Bookmark Categories (#6035)
* database setup and insert/delete working

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

* add new categories screen in bookmarks page

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

* add theme

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

* set tab layout scrollable

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

* cleanup

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

* fix tests

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

* bump database version

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

* add docs

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

---------

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2024-12-17 21:49:32 +09:00
translatewiki.net
0153cbe0ed
Localisation updates from https://translatewiki.net. 2024-12-16 13:01:57 +01:00
Tanmay Gupta
e8970ab7f2
FilePicker: Fix error when multiple images are returned from Documents based picker (#6033)
* FilePicker: Correctly handle Documents result

* Empty commit to re-trigger CI checks
2024-12-15 21:21:30 +09:00
Tanmay Gupta
a933b92efa
Fix caption lost on accepting 'Is this a pic of' (#6030)
Fixes issue 5842 by correcting the implementation of onUserConfirmedUploadIsOfPlace in UploadMediaDetailsContract's UserActionListener

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-14 19:12:44 +09:00
Haoyu Weng
f2d1f7dbbb
[Enhancement] Fix #5042 Add copy link button (#5080)
* Add a "copy link" button next to the share button. Add relative English and Simplified Chinese text in strings.xml.

* Change the icon from copy to link

* Fixed typo

* Fixed case

---------

Co-authored-by: Justweng <justweng19@gmail.com>
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-14 18:45:44 +09:00
Tanmay Gupta
235e8cdba2
Fix edit button shown when image has no location (#6029)
Changed the commons.filepicker.UploadableFile's hasLocation method to use the existing ImageCoordinates class for detecting the presence of geolocation in an image's exif
2024-12-14 17:31:25 +09:00
Parneet Singh
c1acdbe31a
remove method (#6028)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2024-12-14 13:15:52 +09:00
Paul Hawke
2c8c441f25
Convert upload to kotlin (part 1) (#6024)
* 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>
2024-12-13 23:15:13 +09:00
Tanmay Gupta
cb007608d9
Issue #5996 - Fix Android Studio warnings in LocationPickerActivity.kt (#6026)
* Replace deprecated zoomLevel with zoomLevelDouble

* Replace deprecated Html.fromHtml call

* LocationPickerActivity: Replace deprecated methods with androidx

* LocationPickerActivity: Reformatted overlong lines

* Renamed package LocationPicker to locationpicker

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-13 22:49:40 +09:00
Tanmay Gupta
8a55b5e613
FolderDeletionHelper: Fix unintentional deletion (#6027)
* fix issue6020: prevent unintentional deletion of subfolders and non-images by custom selector

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-13 22:41:47 +09:00
Gautham Mohanraj
b2810bcef1
Resolve crash when submitting feedback without internet access (#6018)
* fix: resolve crash when submitting feedback without internet access

* feat:Added check for wheather internet connection was available for a network

* feat:Added SnackBar for Retry and User Info

* feat:Made the feedback dialog not leave screen in case of error

* feat:Removed the network checking from the function

* feat:Added try catch block for the Feedback

* feat:Removed Unnecessary imports

* feat:Used Snackbar and timber instead of log and Toast

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-13 22:30:30 +09:00
translatewiki.net
f51b607312
Localisation updates from https://translatewiki.net. 2024-12-12 13:02:18 +01:00
Parneet Singh
3bfa3612c6
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-11 23:29:50 +09:00
Parneet Singh
9a876fa5e2
make dialog modal (#6015)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2024-12-11 15:08:39 +09:00
Saifuddin Adenwala
c175a4ee03
Migrated category module from Java to Kotlin (#6016)
* Rename .java to .kt

* Rebased category PR

* Resolved conflicts

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-11 11:17:05 +09:00
Saifuddin Adenwala
3030a6fca7
Migrated helper modules to kotlin (#6007)
* 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>
2024-12-11 07:43:36 +09:00
Paul Hawke
73311970c5
Convert wikidata/mwapi to kotlin (part 4) (#6010)
* 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>
2024-12-10 12:18:42 +09:00
Neel Doshi
56ada36b83
Migrated exifInterface to androidx exif.interface (#6013) 2024-12-10 03:54:11 +10:00
Parneet Singh
85d9aef2f3
Feature: Show where file is being used on Commons & Other wikis (#6006)
* add url to build config

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

* add network call functions

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

* return response asynchronously

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

* inject page size in the request

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

* rename from Commons..Response.kt to ..Response.kt

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

* convert to .kt

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

* ui setup working

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

* fix merge conflict

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

* cleanup

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

* fix CI

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

* use suspend function for network calls

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

* doc

* doc

* doc

* doc

* doc

---------

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-09 23:07:44 +09:00
translatewiki.net
04a07ed655
Localisation updates from https://translatewiki.net. 2024-12-09 13:02:13 +01:00
Parneet Singh
cc74707894
delete empty files (#6009)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2024-12-08 14:51:37 +09:00
Neel Doshi
64fd10d00e
Migrate Feedback module from Java to Kt (#5985)
* 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
2024-12-07 16:19:00 +09:00
Paul Hawke
015c5d5c63
Convert wikidata/mwapi to kotlin (part 3) (#6004)
* 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
2024-12-07 12:20:06 +09:00
Neel Doshi
64354fb9e4
chore : Lint fix (#5995)
* Refactor : Fixed lint issues on EditActivity

- Using 'Log' instead of 'Timber'
- Line is longer than allowed by code style (> 100 columns)
- Use of getter method instead of property access syntax
- Should be replaced with Kotlin function
- Cascade 'if' should be replaced with 'when'

* Suppress Deprecation

* Linked Deprecated with Github Issue

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-07 02:24:22 +10:00
Neel Doshi
a8387f01c9
Bug Fixs & Enhancement of Achievement Screen (#5666)
* 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>
2024-12-06 23:15:47 +09:00
Paul Hawke
ae52267a27
Convert wikidata/mwapi to kotlin (part 2) (#5999)
* Convert DepictSearchResponse to kotlin

* Convert Entities to kotlin

* Convert WikiSite to kotlin

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-06 17:50:29 +09:00
Saifuddin Adenwala
f8d519e8eb
Migrated filepicker from Java to Kotlin (#5997)
* 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
2024-12-06 17:31:40 +09:00
Paul Hawke
3777f18bf9
Convert mwapi/wikidata to kotlin (part 1) (#5991)
* 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
2024-12-05 23:13:38 +09:00
translatewiki.net
9dd504e560
Localisation updates from https://translatewiki.net. 2024-12-05 13:01:47 +01:00
Paul Hawke
33548fa57d
Convert profile package to kotlin (#5979)
* 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>
2024-12-03 15:47:25 +09:00
Saifuddin Adenwala
8265cc6306
Migrate location and language module from Java to Kotlin (#5988)
* Rename .java to .kt

* Migrated location and language module from Java to Kotlin

* Changed lastLocation visibility
2024-12-03 15:27:11 +09:00
Saifuddin Adenwala
771f370f9a
Migration of locationpicker module from Java to Kotlin (#5981)
* Rename .java to .kt

* Migrated location picker module from Java to Kotlin
2024-12-02 16:54:26 +09:00
Neel Doshi
fb1ef3212d
Migrated Bookmark from Java to Kotlin (#5960)
* Rename Bookmark Pages from `.java` to `.kt`

* Migrated Bookmark Pages to kotlin
2024-11-30 10:51:53 +09:00
Paul Hawke
1e5521b434
Convert dependency inject ("di") package to kotlin (#5976)
* 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
2024-11-30 10:50:42 +09:00
Paul Hawke
dac3657536
Migrate kvstore to kotlin (#5973)
* 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>
2024-11-29 14:01:29 +09:00
Saifuddin Adenwala
d6c4cab207
Migrated logging module from Java to Kotlin (#5972)
* Migrated logging module from Java to Kotlin

* Rename .java to .kt

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-11-29 13:50:33 +09:00
Paul Hawke
1afff73c24
Migrate campaigns package to kotlin (#5969)
* 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>
2024-11-29 13:44:26 +09:00