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"
* Removed comma separator from file descriptions
* Removed a redundant line that deleted the last comma of the descriptions
* Added a line to formatDescriptions that replaces every instance of "}}, " with "}}" to remove the comma between descriptions.
* Specified separator as an empty string instead of default value ", " for .joinToString method. Deleted previous fix using .replace method.
* Restored buffer.replace() in updateDescription
On taking a look at the following stack trace:
java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
at fr.free.nrw.commons.nearby.fragments.NearbyParentFragment.updatePlaceList(NearbyParentFragment.java:777)
at fr.free.nrw.commons.nearby.fragments.NearbyParentFragment.lambda$initFilterChips$10$NearbyParentFragment(NearbyParentFragment.java:730)
at fr.free.nrw.commons.nearby.fragments.-$$Lambda$NearbyParentFragment$AGol6SoJlvIYd45Vbz6tTjDiWU4.onCheckedChanged(Unknown Source:2)
at android.widget.CompoundButton.setChecked(CompoundButton.java:235)
at com.google.android.material.chip.Chip.setChecked(Chip.java:665)
at android.widget.CompoundButton.toggle(CompoundButton.java:150)
...
... it seems clear the 'places' list is trying to be iterated
in the updatePlaceList method when it is empty. This is resulting
in an NPE and consequently an app crash.
Avoid the same by ensuring it is always initialized to an empty list.
* 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
* UploadMediaPresenterTest: fix failing unit tests
* change else if to if condition to handle all cases
* include errorCodes 68 for duplicate image and 96 for image without exif
* optimise if statements
* remove redundant cases
* modify if statements to cover all cases
* simplify all if statements
* add removed comment again
* remove unused imports
* Add conditional on function onAuthorViewClicked for when there's not logged-in user
* Change media.getAuthor() for media.getUser()
* Change hardcoded URL for one given by the BuildConfig object
* feedback dialog: fix black font in dark mode
* LocationPickerActivity: fix light map in dark mode
* Fix#5182 Switch From Mapbox to MapLibre (#5184)
* Fix#5182 Switch From Mapbox to MapLibre
* Fix#5182 Switch From Mapbox to MapLibre - Resolved requestFeature() issue
* Fix#5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on two screens
* Fix#5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on additional screens
* Fix#5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on notification screen
* Fix#5182 Switch From Mapbox to MapLibre - Test errors
* fix issue #5015 - custom image selector not identifying photo location (#5190)
Co-authored-by: Siva <doodsiva@gmail.com>
* feedback dialog: fix black font in dark mode
* LocationPickerActivity: fix light map in dark mode
* LocationPicker: use predefined style based on device theme
* LocationPickerActivityTest: add additional target exception in catch block
* LocationPickerConstants: remove extra newline introduced
---------
Co-authored-by: Kartikay Kaushik <93285364+kartikaykaushik14@users.noreply.github.com>
Co-authored-by: Siva Subramaniam <112970189+siva-subramaniam-v@users.noreply.github.com>
Co-authored-by: Siva <doodsiva@gmail.com>
* Fix#5182 Switch From Mapbox to MapLibre
* Fix#5182 Switch From Mapbox to MapLibre - Resolved requestFeature() issue
* Fix#5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on two screens
* Fix#5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on additional screens
* Fix#5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on notification screen
* Fix#5182 Switch From Mapbox to MapLibre - Test errors
* Kotlin Version Upgraded to 1.6.10
* Kotlin Version Upgraded to 1.6.20
* Kotlin Version Upgraded to 1.7.20
* Fix:5175 Upgraded Minimum SDK Version, Compile and Target SDK Version
* fix API call to fetch the latest changes
* add database table to keep a track of reviewed and skipped images
* fix repeating reviewed or skipped images
* add removed newline again
* add necessary comments
* change from timber.e to timber.i in case there is no exception
* reintroduce the parameter rctag in the API URL
* modify API URL to retrieve latest uploads
* remove unused imports and code
* modify ReviewHelperTest and add new unit tests
* modify tests in ReviewHelperTest.kt
* add comments about the value of gcmlimit
* fixed Leaderboard: Taping on my avatar should open tip popup explaining how to change it #4774
* fixed Leaderboard: Taping on my avatar should open tip popup explaining how to change it #4774
* Leaderboard: Taping on my avatar should open tip popup explaining how to change it #4774
* fixed Leaderboard: Taping on my avatar should open tip popup explaining how to change it #4775
* fixed:After canceling a sharing, application goes back to the search menu #2296
* fixed:After canceling a sharing, application goes back to the search menu #2296
* fixed:After canceling a sharing, application goes back to the search menu #2296
* fixed SeachActivityUnityTest failure when calling testOnBackPressed and cleaned up unnecessary code
* fix cropped numbers in the Achievements fragment
* add null check in inflateAchievements method to fix NullPointerException in AchievementsFragmentUnitTests
* Update DialogUtil to return the dialog object
* Update first instance of Builder to DialogAlert
* Update DialogUtil to allow null instead of empty string
* Update MediaDetailFragment to use DialogUtil
* Remove unnecessary semicolons
* Update AboutActivity to use DialogUtil
* Update ProfileActivity to use DialogUtil
* Update AchievementsFragment to use DialogUtil
* Remove wrong message set in ProfileActivity
* Update DialogUtil to accept null instead of empty string
* Add showAlertDialog option for UploadPresenter to use
* Move location reminder logic from UploadActivity to UploadPresenter
* Add test cases for dialog alert with handleSubmit
* Change threshold variable name to be more descriptive
* Fix broken reference to renamed constant in tests
* Update method to remove leading whitespace
* Update test cases testing remove whitespace method
* Remove unused whitespace check method
* Add comment about use of strip and trim in dealing with whitespace
* Add option to centre on GPS location for issue #5008
* Rename and add new comments for issue #5008
* Add new comments for issue #5008
* Update comments for issue #5008
* the Review feature (in the app's menu) was originally thought as a way to improve our app's overall upload quality, it is not really adapted to the wide variety of pictures uploaded via other upload tools.
* update the Review API call to request only images with the `android app edit` tag.
* add methods to check and remove trailing whitespace
* fix filter to check and remove trailing whitespace
* fix filter to check and remove trailing space first
* add test and fix filter() and removeTrailingWhitespace()
* caption trailing whitespace: change solution to remove trailing whitespaces when set to uploadMediaDetails
* update code documentation
* add more tests include instance tab, carriage return and Japanese whitespace
* Caption field: Stop blocking Japanese Space, convert to English Space when set to uploadMediaDetails
* Change method name from convertJapSpaceToEngSpace to convertIdeographicSpaceToLatinSpace
* Change pattern name from JapSpacePattern to ideographicSpacePattern
* rewrote reverseGeoCode() method to use Coordinates2Country library; wrote simple TC for receiveImage() method to check if country coordinates are set
* removed unused slf4j import in UploadMediaPresenter class
* updated mock in for setCorrectCountryCodeForReceivedImage() TC to match against exact location arguments
* added javadoc for getCountryNamesAndCodes() method in UploadMediaPresenter; implemented "lazy loading" for countryNamesAndCodes field
* removed unused field added by me from UploadMediaPresenterTest