* Cherry-Picked NPE fix from master (#4569)
* Fix notification bug #4547 (#4570)
* Make Single Query for Nearby and WLM pins (#4573)
* Merge nearby and monument queries
* Bug Fix- query resource path change on shouldQueryForMonuments
* Bug Fixes
1. Propagate exceptions for nearby API calls to caller
2. Fix too much work on main thread exception in NearbyParentFragment
* Modify parameters for Nearby query
* Bug fix- current location marker (#4580)
* Move WLM template below geolocation template (#4582)
* Modify string for WLM upload notice
* Fix bug #4583 (#4591)
* Fix bug #4585 by updating kotlin and acra version (#4592)
* Fixes#4554 - only use WLM2021 template for countries that are included in it (#4574)
* Fixes#4554
1. For WLM uploads reverse geo code and see if the country code is supported -only then is the WLM upload flow triggered, otherwise usual nearby uploads happen
2. Bug Fix - Current Location marker and area
* Fixed compile error added after rebasing
* Bug fix for country code in reverse geo code
* Update WLM camaign dates [Do not merge now, merge only after alpha release] (#4584)
* Updates dates for WML campaign
* Bug fix- campaign dates
* Fixed logic for WLM enablement - stick to the month of September
* Add countries supported by WLM2021 template, except Italy
* Versioning for v3.1.0
* Update changelog.md
* Fix empty default lang bug (#4608)
* Fix bug #4583
* Fix empty default lang bug
* Fixes#4595 - Updated nearby query (#4622)
* Fixes#4595 - Updated nearby query
* Removed logic to replace local language in nearby query - that might acccidentally replace other strings
* Fetch property location in usual nearby query
* Remove duplicate line (#4626)
* Change "learn more" link to new wiki
* Add Sweden's P3426 to property filter
* Fixes#4601 - 1. Handle possible exceptions in upload file from stash 2. Modify MWException, as error is nullable, update getTitle and getMessage to rever that (#4627)
* Versioning for v3.1.1
* Update changelog.md
* Updated DB version to rever integrity
Co-authored-by: Madhur Gupta <30932899+madhurgupta10@users.noreply.github.com>
Co-authored-by: Josephine Lim <josephinelim86@gmail.com>
* Integrate WLM
- Show monuments in maps along with nearby
* BugFix in Monuments
1. Single preference for monuments and campaigns
2. Expand collapse chips container in nearby
3. Typo fix in Monuments card in Nearby
4. If a nearby place is a monument as well - do not show them separately, show it as a monument instead
5. Bug fix, monument radius, use the same one as that of nearby
* More bug fixes
1. Possible NPE in nearby
2. Added column location_address in BookmarkLocationDao
3. Bug Fix - Display Date in WLM card
4. WLM card on click takes to nearby
* Use lowercase country code in WLM uploads
* Bug-Fix, WLM Campaign Icon
* 1. Updated monuments query to use any of the following properties for monuments - [P1435, P2186, P1459, P1460, P1216, P709, P718, P5694] 2. Append WikiData QID to descriptions template
* Updated WLM Banner String, Handle NPE in contributions callback
* Added nearby-monuments query log lines
* Handle WLM Query exception : - if an exception is thrown in WLM query, continue showing the nearby items if that succeeds
* Fix BookmarkLocationDaoTest
* Added Column Address in BookmarkLocationDaoTest
* Use fallback description as usual nearby pins even for WLM pins, instead of relying on P6375
* Test fix in BookmarkLocationDao
* Updated template for WLM, removed redundant feilds
* Fixed WLM template
* Removed categories from WLM template
* Fixed BookmarkControllerTest
* Fixed BookmarkLocationFragmentUnitTest
* fix ModelFunctions
* Fixed BookmarksDaoLocationTest
* Fixed WLM template
It's common for users to expect that re-opening the app would
allow them to "continue where they left off". This also applies
for the case where they leave the app after opening an
external link. It's natural for them to expect that they would
see the webpage they left open when they re-open the app. This
doesn't happen for our app as we open custom tabs in a separate
activity. As a consequence, this makes the experience
un-intuitive.
Fix this by opening custom tabs in the same activity.
Fixes: #2944
Co-authored-by: Adam Jones <jones_adam@rocketmail.com>
* Feature/refractor uploads [WIP] (#2887)
* Fix duplicate param information (#2515)
* Bug fix issue #2476 (#2526)
* Added wikidataEntityID in all db versions, handled db.execSql via method runQuery
* Versioning and changelog for v2.10.2 (#2531)
* Update changelog.md
* Versioning for v2.10.2
* Update changelog.md
* Bugfix/issue 2580 (#2584)
* Corrected string placedholders in certain string files
* Corrected string placedholders in certain string files[Bug fix#2580]
* Bug Fix#2585 (#2647)
* Bug Fix#2585
* Added null checks on view in SearchImageFragment when updating views from external sources
* Disposed the disposables in SearchActivity and SearchImageFragment when no longer in active lifecycle
* use FragmentUtils to verify fragment active state
* Bug Fix issue #2648 (#2678)
* Bug Fix issue #2648
* Handled external storage permission before file download
* * Removed redudant check for permission in MediaDetailPagerFragment (Dexter already does that)
* Removed duplicate code in PermissionUtil$checkPermissionsAndPerformAction, used the existing function with conditional extra parameters
* string name typo correction
* BugFix issue #2652 (#2706)
* Addded null check on bookmark before operating on it
* BugFix issue #2711 (#2712)
* Added null checks in OkHttpJsonApiClient$searchImages MwQueryResponse
* BugFix #2718 (#2719)
* Handled null auth cookies
* Fix#2791: NPE when nominating for deletion and leaving screen (#2792)
* Bug Fix issue #2789 (#2790)
* Handled Illegal State Exception for non existent appropriate view parents in ViewUtils$showShortSnackbar
* BugFix #2720 (#2831)
BugFix deprecated licenes #2720
* ui fixes, wip, upload
* *Issue #2886, BugFix #2832[wip]
* updated UploadActivity code
* modified ui
* Updated UploadPresenterTest
* * updated interfaces names to follow names suffixed with Contract
* added test cases
* card view elevation
* view pager disabled swipe
* bug fix, duplicate image
* used existing non-swipable view pager
* Avoid image view resize with keyboard, added adjustPan and stateVisible as softinputMode for UploadActivity
* retain UploadBaseFragment instances on orientation changes
* * Added test cases for UploadMediaPresenter
* Injected io and main thread schedulers
* categories presenter test cased wip
* Added CategoriesPresenter test
* * Added the logic to show open map (with to be uploaded image's coordinates while uploading image)
* codacy suggested changes * added java docs
* Added travis_wait fot android-wait-for-emulator
* ranamed interface onResponseCallback to Callback
* * Added api to delete picture in UploadModel
* cleanUp in UploadModel. once upload has been initiated
* Removed unused methods from UploadModel and the corresponding test class
* * Added tests for UploadPresenter
* Travis suggested changes
* Addded copy previous title and description
* * Made the upload add descriptions visible when keyboard visible
* add description request focus only when user manually requests it
* Added JavaDocs, review suggested changes
* Fix dagger injection
* use DialogUtil to show info in descriptions
* use activity context for DialogUtil
* Minor changes
* Bug fix, reduced the add description edit text clickable bound (#2973)
* Bugfix/uploads (#3000)
* merged with master
* BugFix IllegalStateException
* setRetainState(true), not required with FragmentStatePagerAdapter
* Increase the ViewPager's Offscreen Limit, we want all the fragments to be active
* BugFix, clear selected categoris for previous upload session
* Clear Selected Categories
* Addded JavaDocs for CategoriesModel
* Code Formatting in app/src/main/java/fr/free/nrw/commons/upload/UploadModel.java
* Added class level JavaDoc UploadRemoteDataSource
* Added class level JavaDoc for UploadRepository
* Added JavaDocs for ThumbnailsAdapter
* Added JavaDocs for MediaLicensePresenter, CategoriesPresenter
* Removed null check on category query
* Show default catgeories based on image title and gps location when category text empty
* Allow search for empty category search
* Attached image scale listener to upload media image
* Bug fix, reduced the add description edit text clickable bound
* Fix memory leak (#3001)
* Bugfix/uploads (#3002)
* merged with master
* BugFix IllegalStateException
* setRetainState(true), not required with FragmentStatePagerAdapter
* Increase the ViewPager's Offscreen Limit, we want all the fragments to be active
* BugFix, clear selected categoris for previous upload session
* Clear Selected Categories
* Addded JavaDocs for CategoriesModel
* Code Formatting in app/src/main/java/fr/free/nrw/commons/upload/UploadModel.java
* Added class level JavaDoc UploadRemoteDataSource
* Added class level JavaDoc for UploadRepository
* Added JavaDocs for ThumbnailsAdapter
* Added JavaDocs for MediaLicensePresenter, CategoriesPresenter
* Removed null check on category query
* Show default catgeories based on image title and gps location when category text empty
* Allow search for empty category search
* Attached image scale listener to upload media image
* Bug fix, reduced the add description edit text clickable bound
* Added tooltip in Title in UploadMediaFragment
* BugFix recent categories
* Updated test methods
* Bugfix/uploads (#3011)
* merged with master
* BugFix IllegalStateException
* setRetainState(true), not required with FragmentStatePagerAdapter
* Increase the ViewPager's Offscreen Limit, we want all the fragments to be active
* BugFix, clear selected categoris for previous upload session
* Clear Selected Categories
* Addded JavaDocs for CategoriesModel
* Code Formatting in app/src/main/java/fr/free/nrw/commons/upload/UploadModel.java
* Added class level JavaDoc UploadRemoteDataSource
* Added class level JavaDoc for UploadRepository
* Added JavaDocs for ThumbnailsAdapter
* Added JavaDocs for MediaLicensePresenter, CategoriesPresenter
* Removed null check on category query
* Show default catgeories based on image title and gps location when category text empty
* Allow search for empty category search
* Attached image scale listener to upload media image
* Bug fix, reduced the add description edit text clickable bound
* Added tooltip in Title in UploadMediaFragment
* BugFix recent categories
* Updated test methods
* Avoid memory leak, free the adpater in MediaLicenseFragment.onDestroyView
* bugfix/uploads (#3012)
* merged with master
* BugFix IllegalStateException
* setRetainState(true), not required with FragmentStatePagerAdapter
* Increase the ViewPager's Offscreen Limit, we want all the fragments to be active
* BugFix, clear selected categoris for previous upload session
* Clear Selected Categories
* Addded JavaDocs for CategoriesModel
* Code Formatting in app/src/main/java/fr/free/nrw/commons/upload/UploadModel.java
* Added class level JavaDoc UploadRemoteDataSource
* Added class level JavaDoc for UploadRepository
* Added JavaDocs for ThumbnailsAdapter
* Added JavaDocs for MediaLicensePresenter, CategoriesPresenter
* Removed null check on category query
* Show default catgeories based on image title and gps location when category text empty
* Allow search for empty category search
* Attached image scale listener to upload media image
* Bug fix, reduced the add description edit text clickable bound
* Added tooltip in Title in UploadMediaFragment
* BugFix recent categories
* Updated test methods
* Avoid memory leak, free the adpater in MediaLicenseFragment.onDestroyView
* BugFix Illegal State Exception in ViewpPagerAdapter
* Remove irrelevant comment
* merge conflict with strings (#3016)
* Beginnings of integration with Wikipedia client library. (#2642)
* Remove remaining unnecessary API version check.
* Roll up sleeves.
* Add and integrate the beginnings of app adapter.
* Remove vestigial event logging logic.
Event logging is no longer used in this app.
* Beginnings: remove StringUtils and associated redundancies.
* Remove redundant capitalize() method.
* Remove redundant urlEncode() method.
* Remove redundant (and incomplete) language lists.
* Remove redundant usages of SimpleDateFormat.
* Remove redundant json type adapter.
* Remove redundant MW error model classes.
* Rip out redundant MW model classes.
* Pass SessionManager into AppAdapter instead of injecting.
* Wire up more of the AppAdapter.
* Remove redundant Gson initialization and type adapters.
* Rip out PageTitle.
This was being used in some slightly incorrect/unexpected ways.
* Don't need static WikiSite.
* Bump data client library version
* Bump library version and fix build
* Fix tests
* Fix build
* Fix media of the day
* With fixes in recently modified APIs
* Use wrapper for accessing shared preferences across the app
* Use Json kv store for storing place object
* Fix tests
* Fix test failure
* Fix UI tests
* Added new upload activity that receives shared files from the gallery. Cards show and hide, plus titles are correct. Displayed thumbnails for the shared images
* Better handling of the view paging plus error handling for required fields.
* Code cleanup to make things more readable.
* Extracted a model from the category search fragment that can possibly be shared with the new upload activity.
* Added category selection to the combined upload screen.
* Cleanup before the home-stretch on the GUI.
* Adding license selection.
* Fixed build warnings + cleanup
* Start to support the dark theme.
* Work in progress to add quality checking.
* Fixing merge.
* GPSExtractor: optimized away the EXifInterface object
* Implemented submit functionality, temporarily fixed jacoco crash by disabling DUMMY UploadView object.
* Implemented uploading of categories along with the picture. The category screen now displays GPS and recent categories when nothing is searched.
* Implemented caching of files. Did some work on picture quality detection.
* Implemented too dark picture detection.
* Added a side card for zoom and map buttons along with pretty animations for stuff.
* Added duplicate image on commons checking and fixed files not getting proper file extensions in several places.
* Added support for map button and switched in-app upload buttons to UploadActivity
* Pretty pretty animations!
* Implemented zoom functionality for th background image. Just pinching on the image works instead of requiring buttons.
* Added multi-language descriptions with categories by region.
* Reimplemented the duplicate title checker and implemented a check against putting the same language twice in the description.
* Javadocs for Description and UploadPresenter, plus some general cleanup.
* Small code changes.
* Implemented login checks for the Upload screen.
* Implement receiving data from Nearby.
* Feature/permissions library (#1855)
* Added permission for Dexter, the runtime permission handling library
* [Preparing fir issue #1773] Added a utility function which would take the user to app settings screen where he could manually give us the required permission
* Added an alert dialog with positive and negative callback [Preparing fir issue #1773]
* Improvements in the way External Storage Permission is handled in MultipleShareActivity[Bug fix#1697]
1. Used dexter to handle the external storage permission
2. Behaviour changes : When user tries to share(uppload) images to commons via MultipleShareActivity, following decision tree is followed
a. If the app has permission for external storage, normal upload operation is followed
b. If the app does not has the permission for external storage, dexter is used to ask for the same
c. If the user gives us the required permission, normal upload flow is proceeded
d. If the doesnot gives us the required permission a rationale dialog is shown with the appropriate message to let him know why we need the permission
e. If he presses okay, steps a-c are followed and if he presses cancel, we close the app.
f. If while asking for permission, the user chooses never ask again, then next time he tries to upload an image via MSA, the rational dialog follows the app setting screen where he could manually give us the required permission and the onActivityResult of same is handled
* Added a Constants class to handle request and result codes from one place and other related constants common to the all app elements
* replaced hardcoded strings ok and cancel in DialogUtil to string resources
* init permission rationale dialog in activities onCreate
* Code formatting, updated access modifiers wherever required, added javadocs for new methods created
* *shifted constants to app class
*Added JavaDocs in PermissionUtils
* removed class REQUEST_CODES from CommonsApplication and instead put the enclosing constants in the App class itself
* Made Codacy happy.
* Abstarcted permission acquisition into new class DexterPermissionObtainer
* Fixed Nearby upload detection
* Migrated bad picture detection from AsyncTask to RxJava.
* Removed ShareActivity and related dead code
* Removed dead or duplicate code from FileProcessor
* Added info button to title EditText
* Fixed the add description button not disappearing.
Added "Starting Upload" toast.
Added link to the license on final screen.
Made it so that the map button is hidden when image lacks gps coords.
* Support in app multiple uploads
* Minor changes to fix build
* Changes to fix pending issues with upload flow
* Fix display of similar image fragment
* When uploading several files at once the date is missing #1854 (#2)
* Bug fix issue #1854
* updated ContributionsDao to save create date, which it was not doing currently [it was instead saving current date]
* UploadItem accepts are dateCreated param
* Added a function in UploadModel, getFileCreatedDate which tries to fetched the file creaction date from all possible content providers.
* Fix pending issues in upload flow
* Make multiple uploads work for Google Photos
* Fix default state for upload activity
* Fix keyboard state for license screen
* Fix descriptions for uploads
* wip
* Fix language spinner
* Fix log reporting for release builds
* Fix logs for release builds
* wip
* Clean up the branch to exclude unrelated changes
* With java docs
* Uncomment quiz checker
* Check for external storage permissions before sending logs
* With more java docs
* Fix crash while zipping log files
* Do not log token and cookies
* Add instruction to restart app
* Bugfix/upload via share (#1920)
* Bug Fix#1878
* Added a java library to fetch the MIME type from input stream
* Fetch MIME type using this and use the contribution tag only when this fails:
* formatting changes, removed unused commented out line
* Versioning and changelog for v2.8.5 (#1923)
* Versioning for v2.8.5
* Update changelog.md
* Add Traceur for getting meaningful RxJava stack traces (#1832)
* Hotfix for overwrite issue in 2.8.0 (#1838)
* This solution is an hotfix for overrite issue came back on 2.8.0 version. What I did is checking the extension, and if it is null, adding .jpg suffix. Because commons files always have suffixes, and we should compare file names after adding suffixes. Othervise overrides are possible.
* Check if file title includes an extension already, by checking if is there any dot in it.
* Fix logic error
* Add uncovered tests
* Remove unecessary line breaks
* Make Javadocs more explicit
* Versioning and changelog for v2.8.2 (#1842)
* Versioning for v2.8.2
* Changelog for v2.8.2
* Add logs in wiki data edit and session refresh flow (#1874)
* Fix logout (#1875)
* [WIP] Refactor feedback and quiz to reduce possibility of NPE (#1881)
* Refactor feedback and quiz to reduce possibility of NPE
* Handle throwables in quiz checker
* Minor refactoring
* Set Traceur to only work in DEBUG mode (#1884)
* Bug fix for uploaded images count in achievements activity (#1885)
* Versioning and changelog for v2.8.3 (#1886)
* Update changelog.md
* Versioning for v2.8.3
* Implemented Statistics
* Basic Structure Implemented
* Layout made screen independent and menu inflated
* Share Screenshot using cache
* Improved the Image Bound and added strings
* Improved the quality of Pr
* Wired to navigation drawer
* Changed the bounds of the image
* Added Info icon
* Removed the unecessary functionality
* Updated JavaDocs and fetch the username
* Fetch JsonObject from the api using JavaRx and OkHttp
* Added JavaDocs and improved quality
* fixed strings file
* Improved the quality of pr
* Render thanks , images used in articles on screen
* fetch and rendered the upload count
* FeaturedImages statistics rendered and Javadocs added
* added ProgressBar
* Added Class for calculating level
* added level info and returned level info
* level up info rendered on achievement activity
* Inflated Level Number
* Added the structure for badge
* Added LevelUpInfo Programmetically on Drawable
* aligned the text
* changed the text
* Implemented the structure for changing colour of drawable
* Added functionality to change colours of badge during runtime
* Added custom alert for share option
* Improved the UI of screen
* Added the alertDialog for info button
* Improved the quality of PR
* Added Builder model
* Added Enum Model and increased levels to 15
* removed redundant class
* Changed strings and added subtext
* Feedback Module: Add reverts rate parameter (#1649)
* Fetched Revert Count
* Refactored Achievements class and display the fetched results
* Refactored the levelController to include revert as parameter
* Fixed error
* Fixed bug
* Added information for parameters and improved code quality
* Javadocs added
* Added null check and javadocs
* Removed extra spaces
* Try to get the localized version of the wikipedia article before defaulting to the English version.
Tested with Spanish on physical Android device.
Other notes:
Difficulties building with gradle due to dexcount plugin: https://github.com/KeepSafe/dexcount-gradle-plugin/issues/234. In testing, disabled the plugin.
* Update article fetch to not include unnecessary SERVICE line
* Add checks for local file, check for string length
* Localisation updates from https://translatewiki.net.
* Integrate API for displaying featured images (#1456)
* Integrate API for displaying featured images
* Add pagination and refactor code so that it can be reused for category images
* Add license info to the images
* Fix author view
* Remove unused values
* Fix minor issues with featured images
* Fix null license url issue
* Remove some log lines
* Fix back navigation issue
* fix tests
* fix test inits
* Gracefully handling various error situations
* Added java docs
* Update pull_request_template.md (#1476)
* Update pull_request_template.md
* Remove Javadocs mention
* Added required/optional notes
* resolves#1464 : MediaDataExtractor is making inefficient (redundant) server calls (#1496)
* Open map of place where picture was taken (#1360)
* Intent to map added
* Merge conflicts resolved
* Added the functionality to hide FAB incase of null coordinate
* Merge Conflict resolved
* Improve pr quality
* Improve Quality
* Added nested FAB animations
* Nested FAB implemented
* Improve Quality
* Added up arrow
* Javadocs Added
* Add nearby tutorial (#1467)
* Add dependency for MaterialShowcase
* Add actionview class to get a reference to material showcase
* Create a NearbyMaterialShowcaseSequence class
* Apply sequence steps
* Add first three steps of nearby showcase
* Add sequence id constants to make sure they will be displayed only once
* Add last step of sequence to explain plus fab
* Create an object to prevent customize all sequences every time
* Fix typo
* Code cleanup
* Add strings to strings.xml
* Code cleanup
* Revert irrelevant change
* Revert irrelevant change
* Remove showcaseview for recenter button
* Use single showcaseView instead of sequence
* Add single showcase view insted of sequence to be able to edit text style
* Make sure it will be displayed only once
* Cleanup
* Update strings
* Change dismiss text style
* CONTRIBUTING: fix formatting of the gist of the guidelines (#1453)
* CONTRIBUTING: fix formatting of the gist of the guidelines
First level headings for a gist seems to be overkill.
So, replace first level headings with an ordered-list which
sounds more meaningful.
* CONTRIBUTING: specify clearly that 'blame' is a feature of "Git"
The contributing file specifies about the ability to know who wrote
something without the need of @author javadoc tags but incorrectly
attributes the feature to GitHub.
Correctly attribute the feature to where it belongs, Git, and specify
the name of the feature to help users easily take advantage of it.
* Feature/switch to butterknife (#1494)
* Implemented butterknife in MediaDetailFragment [issue #1491]
* Implemented butterknife in MediaDetailPagerFragment [[issue #1491]]
* post merge upstream master wip [[issue #1491]]
* Localisation updates from https://translatewiki.net.
* Bug fix#1504 (#1506)
* Bug fix#1504
* Filtered messages with ConnectException [issue #1504]
* A generalised message for exceptions in Nearby Activity [issue #1504]
* Localisation updates from https://translatewiki.net.
* Fix security exception crash while accessing network location provider (#1498)
* Fix security exception crash while accessing network location provider
* Added java docs
* Localisation updates from https://translatewiki.net.
* Log P18 edits to wikidata corresponding wikidata entity on uploading a nearby image
* Added java docs
* Fix test build
* Refresh nearby
* Refresh nearby list on successful edit
* Java docs
* Make authenticated wikidata edits
* Updated toast message to show entity name that was edited
* Launch Rate Us Feature from AboutActivity
Rate us feature is added in Utils, But it is never used/launched.
* Add LaunchRatings Method in AboutActivity
* Fix Package Name to enable rate us feature
The rate us feature was not working for the debug build type since getPackageName() was returning the fr.free.nrw.commons.debug. Use of this package name was leading to an error on google play.
* Replace getPackageName() with BuildConfig.class.getPackage().getName() in rateApp method of Utils.java