* 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>
* Issue #5811: "Delete folder" menu in custom image selector
* Issue 5811: folder deletion for api < 29.
* Issue 5811: folder deletion for api < 29.
* Issue 5811: folder deletion for api 29.
* Issue 5811: folder deletion
* Issue 5811: fixes merge conflicts, replaces used function onActivityResult with an ActivityResultLauncher
* Update Constants.java
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* UI design for legend to explain the colors of the nearby pins
* Add listener for the button to toggle the visibility of the legend (make it hideable)
* Change wording for legend and make text localizable
* Fixed typo
* Fixed typo
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit adds logic to classify notifications as "email" type when the notification text contains "sent you an email". It also updates the email notification prompt to support localization, ensuring a better user experience across different regions.
### Problem:
1. Previously, email-related notifications from the backend were missing a URL. As a result, when users clicked on these notifications, there was no link to open, and the notifications were categorized as UNKNOWN. This led to a poor user experience since there was no feedback provided when the user clicked on an email notification.
2. Additionally, the existing code used hardcoded English text for the email notification prompt, which did not provide a localized experience for users in different regions.
### Solution:
1. Added logic to categorize email-related notifications as `EMAIL` when the notification text contains "sent you an email".
2. Replaced the hardcoded "Check your email inbox" string with a localized string and added translations for multiple languages, including zh, zh-rhk, zh-rcn, zh-rtw, and ja.
### Changes:
- **NotificationClient**:
- Modified `WikimediaNotification.toCommonsNotification()` to check if the notification text contains "sent you an email". If it does, the notification is classified as `EMAIL_MESSAGE` instead of the default `UNKNOWN`.
- **NotificationActivity**:
- In the `NotificatinAdapter` click handler, added a check for `EMAIL_MESSAGE` type. When an email-type notification is clicked, a localized "Check your mail box" prompt is shown using `Snackbar`, instead of attempting to open a URL (which is typically missing for such notifications).
- Modified to fetch the string using `getString(R.string.check_your_mail_box)` to support localization.
- **NotificationType**:
- Added a new `EMAIL` type to categorize email-related notifications.
- **Localization**:
- Added localized translations for "Check your mail box" in zh, zh-rhk, zh-rcn, zh-rtw, and ja.
Co-authored-by: Qiutong Zeng <Qiutong.zeng@anu.edu.au>
* Splitted the query
* Made changes to the query
* Improvised query
* Improvised query by dividing in the batches
* Fixed failing tests
* Improved batches
* Improved sorting
* Fixes issue caused by search this area button
* Fixed failing tests
* Fixed unnecessary reloads on onResume
* Fixed few pins not loading on changing apps
* Improved zoom level and fixed the pins not loading from the center
* Removed toggle chips and changed pin's color
* Fixed wikidata url
* Fixed unit tests
* Implemented retry with delay of 5000ms
* Fixed exception issue and pins issue
* Added change color icon to pin
* Improved pin clicking
* Removed search this area button
* Implemented caching of places
* Fixed unit test
* Factorized methods
* Changed primary key from location to entity id
* Fixed tests
* Fixed conflicts
* Fixed unit test
* Fixed unit test
* Fixed the bug
* Fixed issue with pin loading on the first launch
* Updated javadocs
* Temporary commit - only for testing
* Replaced Temporary commit
* Temporary commit - Added jcenter
* Made minor changes
* Fixed unit tests
* Fixed unit tests
* Fixed minor bug
* feedback: add info about where the feedback gets posted
Fixes#5747
* feedback: avoid underscore in the link's alternative text
* wording
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Add AlertDialog for categories and modularize receiveSharedItems
* Improve nearby-place search function for a multi-upload
Enhance the depiction consistency of a multi-upload by ensuring that it corresponds to a single place
* Add javadoc
* Update strings.xml
* Renamed setImageTobeUploaded to setImageToBeUploaded
* Make uploadIsOnPlace private & add a setter
* Rename uploadIsOnPlace to uploadIsOfAPlace
* Use singular when there is only one picture
* Add a 'Do not show again' checkbox on the dialog
* Update strings.xml
---------
Co-authored-by: Giannis Karyotakis <110292528+karyotakisg@users.noreply.github.com>
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Resolved merged conflicts
* Resolved merge conflicts and updated workflow
* Updated Location Flow and merged conflicts
* Update flow and merge conflicts
* Fixed LocationPicker's location flow
* Removed redundant code from LocationPermissionsHelper
* Fixed Explore fragment crashing and incorrect behaviour
* Updated LocationPicker Flow
* Fixed Nearby not working as intended
* Final update to location flow of all maps
* Added the reqested changes and fixed bugs
* Resolved requested change in in-app camera location flow
* Fixed In-app camera location flow
* Resolved conflicts in ContributionsListFragment
* Updated java doc as requested
* Resolved nearby card dialog not being shown
* Optimised LocationPermissionsHelper javadoc
* Made requested changes for preference check
* Added javadoc and requested comment for later reference
* Implemented requested code changes
* Fixed failing test due to changes made during PR
* Added string resource for ExploreMapFragment
* Changed string resource for rationale dialog
* Added standard location flow information in LocationPermissionsHelper
* Added javadoc for doNotAskForLocationPermission
* Removed unused import
* Updated javadoc
* Removed values-yue-hant
* Fix some merge conflict errors
* Fix minor errors due to mergre conflicts
* Fix some refactor errors
* Fixed minor bug due to merging conflicts
* Delete app/src/main/res/values-yue-hant directory
* Final changes to NearbyParentFragment
* Fixes#5686 map coordinates set to image coords
* Removed some redundant code from recenterMap
* Removed one test whose method no longer exists
* Removed unused method from contract of nearby
* Removed redundant method from NearbyParentFragment
* nearby: add a FIXME about the possibly redudant code
---------
Co-authored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
* Feat : Added a place for users to add feadback on github
* Code Cleanup : Added Github Issue URL as Const
* Homogenized
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Fixed Grey empty screen at Upload wizard caption step after denying files permission
* Empty commit
* Fixed loop issue
* Created docs for earlier commits
* Fixed javadoc
* Fixed spaces
* Added added basic features to OSM Maps
* Added search location feature
* Added filter to Open Street Maps
* Fixed chipGroup in Open Street Maps
* Removed mapBox code
* Removed mapBox's code
* Reformat code
* Reformatted code
* Removed rotation feature to map
* Removed rotation files and Fixed Marker click problem
* Ignored failing tests
* Added voice input feature
* Fixed test cases
* Changed caption and description text
* Replaced mapbox to osmdroid in upload activity
* Fixed Unit Tests
* Made selected marker to be fixed on map
* Changed color of map marker
* Fixes#5439 by capitalizing first letter of voice input
* Removed mapbox code1
* Removed mapbox code2
* Fixed failing tests
* Fixed failing due to merging
* Added feature to save nearby places as GPX and KML
* Fixed error caused by null
* Improved UX for Nearby Export
* Delete app/src/main/res/values-yue-hant directory
* Fixed internationalization issue
* Fixed Grey empty screen at Upload wizard caption step after denying files permission
* Empty commit
* Fixed loop issue
* Created docs for earlier commits
* Fixed javadoc
* Fixed spaces
* Added added basic features to OSM Maps
* Added search location feature
* Added filter to Open Street Maps
* Fixed chipGroup in Open Street Maps
* Removed mapBox code
* Removed mapBox's code
* Reformat code
* Reformatted code
* Removed rotation feature to map
* Removed rotation files and Fixed Marker click problem
* Ignored failing tests
* Added voice input feature
* Fixed test cases
* Changed caption and description text
* Replaced mapbox to osmdroid in upload activity
* Fixed Unit Tests
* Made selected marker to be fixed on map
* Changed color of map marker
* Fixes#5439 by capitalizing first letter of voice input
* Made UI changes in UploadMediaDetailAdapter
* Added javadoc
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* Resolves#2307 by adding user level in menu
* Formatted code as requested
* Start sentence with uppercase
* javadoc
* Fixed my typo
* javadoc
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
* feat: add backgroundColor property on media
* feat: add optional menu items for media backgroundColor
* fix: test pass when running in batch
* refactor: remove backgroundColor from media
* refactor: add string for background color menu
* chore: remove useless change
* feat: change media image background color
* feat: pass backgroundColor to ZoomableActivity
* chore: remove extra space
* Add basic image limit warning to custom selector
* Block upload button when image limit is exceeded
* Complete basic functionality for upload limit: Disabled button, warning sign & toast
* Consolidate functionality between upload limit and not for upload marking
* Upload Limit: write unit tests and optimize control flow
* Upload Limit Tests: improve logic coverage and alter to stay valid if limit is changed
* Upload Limit: polish javadocs and add explanation to warning toast.
* Upload Limit: refactor variable names
* Upload Limit: change warning toast to dialog box, repurposing welcome dialog code & layout
* Upload Limit: remove error icon when the mark as not for upload button is pressed
* UI setup for the crop feature almost setup
* basic setup of rotate feature done
* Added basic changes for editing feature
* Getting data back from edit activity
* Getting data back from edit activity
* Updated contentUri
* Finally the rotated image is getting uploaded
* Minor Improvements for better testing
* Fixed thumbnail preview
* Fixed loss of exif data
* Copy exif data
* Save exif data
* Added java docs
* Minor fix
* Added Javadoc
* Refactoring
* Formatting fixes
* Minor Formatting Fix
* Fix unit test
* Add test coverage
* Formatting fixes
* Formatting Fixes
---------
Co-authored-by: Priyank Shankar <priyankshankar@changejar.in>
* LocationPickerActivity: fix crash on setting location for pictures with no EXIF location
* strings.xml: remove extra string introduced
* optimise constants
* LocationPickerActivity: request for permission only on tapping target icon
* remove newline
* handle location permissions using LocationPermissionsHelper
* fix stuck uploads
* automate retries for failed uploads once the user returns to the app
* UploadWorker: modify PendingIntent flag and Android version code
* MainActivity: remove automatic retry logic
* Revert "MainActivity: remove automatic retry logic"
* set work request as expedited
* handle notification for foreground service on older versions of Android
* set backoff criteria for work requests
* enqueue failed uploads for a retry
* revert "enqueue failed uploads for a retry"
* limit the number of retries for a failed upload
* add a popup that suggests users to switch to unrestricted battery usage mode
* take users to the battery settings page on the first big upload
* take users to battery optimisation settings page using the standard intent
* add instructions to the battery optimisation settings popup
* remove the first usage of fr.free.nrw.commons from the popup
* comply with the wording in the OS settings
* modify battery optimisation popup instructions, add comments and rename firstBigUploadSet
* add filename to the retry log statement
* update database version
* make battery optimisation dialog appear only on Android 6 and above
* use foreground service instead of setting work request as expedited
* fix retried uploads stuck in queued state
* use MIN_BACKOFF_MILLIS constant instead of using the number 10 and add comments
* factorise the creation of the new OneTimeWorkRequest at one place
* ensure work requests are in accordance with the unit tests
* forbid retries for images which have got uploaded without caption
* add a TODO for the suggestion related to retries
* revert "forbid retries for images which have got uploaded without caption"
* Revert "Revert a1b6973 until we find out why it uses OPEN_DOCUMENT by default on fresh install"
This reverts commit 7ce3b7ebb1.
* Potential fix for get_content picker being used in first run
The initial state of the 'openDocumentPhotoPickerPref' seems to be incorrect
during a fresh install on some devices.
Try to ensure we always use the proper initial state by propagating the default
to the preference access code.
This hopefully fixes#5274
Merging as this is a great improvement, additional issues/bugs can be filed as GitHub issues.
* fix in-app camera location loss
* fix failing unit tests
* UploadMediaDetailFragmentUnitTest: modify testOnActivityResultAddLocationDialog to have null location
* reintroduce removed variable
* enable prePopulateCategoriesAndDepictionsBy for current user location
* add relevant comment and fix failing test
* modify dialog and disable location tag redaction from EXIF
* modify in-app camera dialog flow and change location to inAppPictureLocation
* change location to inAppPictureLocation
* fix location flow
* preferences.xml: remove redundant default value
* inform users about location loss happening for first upload
* FileProcessor.kt: remove commented-out code
* prevent user location from getting attached to images with no EXIF location in normal and custom selector
* handle onPermissionDenied for location permission
* remove last location when the user turns the GPS off
* disable photo picker and in app camera preferences in settings for logged-out users
* remove debug statements and add toast inside runnables
* photo picker: toggle behaviour of switch and adjust phrasing for better UX
The enable state used to trigger the GET_CONTENT intent. Alter the flow
such that the GET_CONTENT intent is triggered when switch is disabled.
Adjust default value and other parts of code naming to reflect this.
The existing phrasing had a lot of tech jargon in it which could
result in the non-technical users being confused. Tweak the phrasing
to avoid such phrases.
The documentation in the website could also use some follow up
improvements.
* Adjust strings to clearly convey that location loss is a "risk"
* MainActivity: add ACCESS_MEDIA_LOCATION permission check to retain location info in EXIF metadata
* remove redundant permission check and optimise imports
* FilePicker: switch to ACTION_OPEN_DOCUMENT intent for opening image files
* add a comment explaining the change
* implement GET_CONTENT photo picker toggle switch
* add location loss warning pop up
* SettingsFragment: modify the comment about GET_CONTENT takeover for more clarity
The phrase "Is this a photo of Place ...?" when placed along with an actual place
name could get confusing. For instance, "Is this a photo of Place More London?"
The casing of "Place" is especially confusing. So, tweak the phrase to avoid
this ambiguity.
Co-authored-by: Kaartic Sivaraam <kaartic.sn@zohocorp.com>