mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Commons app mirror
androidcommonsgood-first-issuegsochacktoberfesthelp-wantedjavakotlinkotlin-androidphotographywikimediawikimedia-apiwikimedia-commons
* NearbyParentFragment.kt: add helper methods for user location overlays and accuracy data. Before this commit, the code used to create the user location overlays was in multiple places. Additionally, there was no easy way to access the location accuracy. This commit places the user location overlay creation code into helper methods, as well as adding a new location accuracy getter method. These methods can now be used to refactor other parts of the file. * NearbyParentFragment.kt: create method to update user location overlays Before this commit, there was no easy way to update the user location overlays. This commit adds the updateUserLocationOverlays() method, which will properly replace the old user location overlays with new ones. It will also add the overlays if they do not already exist. * NearbyParentFragment.kt: replace old code with calls to updateUserLocationOverlays() This commit completes the refactor and fixes the issue of the user overlays not updating. The new method updateUserLocationOverlays is called to refactor and simplify old code. * Removal of file is not related to the issue, but is needed for project to compile and run. * NearbyParentFragment.kt: fix bug where multiple user location overlays would appear Before this commit, the user could see multiple user location overlays if they paused the app and reopened it when there are no Places/pins on the map. This was caused by a linear search failing to identify the target overlay because it compared Drawables between two Overlays, which was unreliable. This commit contains a better solution for replacing existing user location overlays by adding 2 instance variables to keep track of the overlays. The position of these overlays in the overlay list can then be found by using indexOf() with these instance variables rather than the linear search that was implemented before. Some refactoring was also done. --------- Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com> |
||
|---|---|---|
| .github | ||
| .idea | ||
| app | ||
| design | ||
| fastlane/metadata/android/en-US/images | ||
| gradle | ||
| update-license-info | ||
| .gitignore | ||
| .mailmap | ||
| build.gradle.kts | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| COPYING | ||
| CREDITS | ||
| dependency-injection.md | ||
| find-broken-strings-variables.sh | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| jacoco.gradle | ||
| nr-commons.keystore.enc | ||
| play.p12.enc | ||
| README.md | ||
| RELEASE-CHECKLIST.md | ||
| settings.gradle.kts | ||
| sign.sh | ||
Wikimedia Commons Android app
The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons. Download the app here, or view our website.
Initially started by the Wikimedia Foundation, this app is now maintained by grantees and volunteers of the Wikimedia community. Anyone is welcome to improve it, just choose among the open issues and send us a pull request! :-)
Documentation
Our documentation repository contains extensive documentation for users, contributors, and developers alike:
Contributors
Thank you all for your work!
.. and many more.
License
This software is open source, licensed under the Apache License 2.0.