Commit graph

3173 commits

Author SHA1 Message Date
Ashish Kumar
8cd9bd5524 Fix category search bug (#3080)
* Closes #3027
* Concat category search with search with image title list and default categories

* Fixed unit test CategoriesPresenterTest.searchForCategoriesTest

* bug fix [search for categories even when the edit text is empty (perform title based search)]

* Category items should show the selected item on top
2019-07-21 23:50:35 +10:00
translatewiki.net
1560b77652 Localisation updates from https://translatewiki.net. 2019-07-18 16:19:33 +02:00
Vitaly V. Pinchuk
32715d9cce Set defaults to ON for all EXIF tags (#3068) 2019-07-16 19:46:23 +10:00
Vivek Maskara
75f3098c35
Fix build (#3075) 2019-07-16 03:00:28 +05:30
Ilgaz Er
8b36ee52d1 Migrated OkHttpJsonApiClient#getMedia and getPictureOfTheDay to MediaClient (#3056)
* With media client APIs migrated to retrofit (#2998)

* With media client APIs migrated to retrofit

* Add test cases and java docs

* Fix test

* Fix build

* Fix build and other minor issues

* Fix tests

* Categories related client API's migrated to retrofit (#3053)

* Commit 1

* searchCategories migrated to retrofit

* SearchCategoriesFragment migrated to new API

* Removed unused code

* Created tests

* implemented searching by prefix
fixed SearchCategoryFragment behaviour where the same categories would be added to the list instead of new ones.

* added tests

* Migrated searchTitles to searchCategories, function behaviour seems identical

* With media client APIs migrated to retrofit (#2998)

* With media client APIs migrated to retrofit

* Add test cases and java docs

* Fix test

* Fix build

* Fix build and other minor issues

* Fix tests

* Categories related client API's migrated to retrofit (#3053)

* Commit 1

* searchCategories migrated to retrofit

* SearchCategoriesFragment migrated to new API

* Removed unused code

* Created tests

* implemented searching by prefix
fixed SearchCategoryFragment behaviour where the same categories would be added to the list instead of new ones.

* added tests

* Migrated searchTitles to searchCategories, function behaviour seems identical

* OkHttpJsonApi#getMediaList migrated to retrofit (#3054)

* Migrated OkHttpJsonApi#getMediaList partially to MediaClient#getCategoryImages

* Migrated rest of OkHttpJsonApi#getMediaList functionality to MediaClient#getCategoryImages

* Removed unused code and tests

* Fixed small bug

* Added tests

* Removed unused CategoryImageController

* getSubCategoryList and getParentCategoryList migrated to retrofit (#3055)

* Migrated getSubCategoryList to retrofit

* Migrated getParentCategoryList to retrofit

* Removed obsolete functions

* Added tests

* Fixed small bugs

* Migrated OkHttpJsonApiClient#getMedia and getPictureOfTheDay to MediaClient

* Removed obsolete functions and added tests

* Fixed merge errors

* With media client APIs migrated to retrofit (#2998)

* With media client APIs migrated to retrofit

* Add test cases and java docs

* Fix test

* Fix build

* Fix build and other minor issues

* Fix tests

* Categories related client API's migrated to retrofit (#3053)

* Commit 1

* searchCategories migrated to retrofit

* SearchCategoriesFragment migrated to new API

* Removed unused code

* Created tests

* implemented searching by prefix
fixed SearchCategoryFragment behaviour where the same categories would be added to the list instead of new ones.

* added tests

* Migrated searchTitles to searchCategories, function behaviour seems identical

* OkHttpJsonApi#getMediaList migrated to retrofit (#3054)

* Migrated OkHttpJsonApi#getMediaList partially to MediaClient#getCategoryImages

* Migrated rest of OkHttpJsonApi#getMediaList functionality to MediaClient#getCategoryImages

* Removed unused code and tests

* Fixed small bug

* Added tests

* Removed unused CategoryImageController

* getSubCategoryList and getParentCategoryList migrated to retrofit (#3055)

* Migrated getSubCategoryList to retrofit

* Migrated getParentCategoryList to retrofit

* Removed obsolete functions

* Added tests

* Fixed small bugs

* Consume login client from data client library (#2894)

Fix actions for review client

Use data client library for notifications

With delete helper migrated to data client

With wikidata edits

With notifications and modifications migrated to data client

With upload migrated to retrofit

Delete unused code

Reuse thank interface from the library
2019-07-16 02:08:18 +05:30
translatewiki.net
94f3b6ea39 Localisation updates from https://translatewiki.net. 2019-07-15 19:58:46 +02:00
Vivek Maskara
d24ca9d4fe
Localisation updates from https://translatewiki.net. (#3072) 2019-07-15 16:39:50 +05:30
Ashish Kumar
0628b1b8f5 bug fix sync service (#3069) 2019-07-14 13:20:13 +05:30
Vivek Maskara
cd57552d76
Fix auth issues in the app (#3064) 2019-07-12 01:49:28 +05:30
translatewiki.net
bb570a5afc Localisation updates from https://translatewiki.net. 2019-07-11 17:18:56 +02:00
Vivek Maskara
5d64cacb30 Merge branch 'master' into backend-overhaul 2019-07-11 15:42:02 +05:30
Vivek Maskara
98c7b9d961 Enable verbose logging and log response body (#3063) 2019-07-11 18:55:49 +10:00
Vivek Maskara
853c8a6379 Consume login client from data client library (#2894)
Fix actions for review client

Use data client library for notifications

With delete helper migrated to data client

With wikidata edits

With notifications and modifications migrated to data client

With upload migrated to retrofit

Delete unused code

Reuse thank interface from the library
2019-07-10 23:11:18 +05:30
Vivek Maskara
d427a77c2a Consume login client from data client library (#2894)
Fix actions for review client

Use data client library for notifications

With delete helper migrated to data client

With wikidata edits

With notifications and modifications migrated to data client

With upload migrated to retrofit

Delete unused code

Reuse thank interface from the library
2019-07-10 23:11:18 +05:30
Ilgaz Er
623c2f5467 getSubCategoryList and getParentCategoryList migrated to retrofit (#3055)
* Migrated getSubCategoryList to retrofit

* Migrated getParentCategoryList to retrofit

* Removed obsolete functions

* Added tests

* Fixed small bugs
2019-07-10 23:11:18 +05:30
Ilgaz Er
97122296dd OkHttpJsonApi#getMediaList migrated to retrofit (#3054)
* Migrated OkHttpJsonApi#getMediaList partially to MediaClient#getCategoryImages

* Migrated rest of OkHttpJsonApi#getMediaList functionality to MediaClient#getCategoryImages

* Removed unused code and tests

* Fixed small bug

* Added tests

* Removed unused CategoryImageController
2019-07-10 23:11:18 +05:30
Ilgaz Er
d5198be3e3 Categories related client API's migrated to retrofit (#3053)
* Commit 1

* searchCategories migrated to retrofit

* SearchCategoriesFragment migrated to new API

* Removed unused code

* Created tests

* implemented searching by prefix
fixed SearchCategoryFragment behaviour where the same categories would be added to the list instead of new ones.

* added tests

* Migrated searchTitles to searchCategories, function behaviour seems identical
2019-07-10 23:11:18 +05:30
Vivek Maskara
78141cb609 With media client APIs migrated to retrofit (#2998)
* With media client APIs migrated to retrofit

* Add test cases and java docs

* Fix test

* Fix build

* Fix build and other minor issues

* Fix tests
2019-07-10 23:11:18 +05:30
Ashish Kumar
828b5a3cd1 Closes #3061 (#3062)
* Added null check for contribution with position in ContributionsListFragment
2019-07-10 19:10:34 +10:00
translatewiki.net
f605c5c13a Localisation updates from https://translatewiki.net. 2019-07-08 20:02:32 +02:00
Ashish Kumar
fe540eb135 Bugfix/getuploadcount (#3049)
* Closes #3048
* response.body().string() was called more than once and because response body can be huge so OkHttp doesnot store it in memory, it reads it as a stream from network when we need it, which cannot be done without a new request.

* null check in response.body()

* Fixed possible NumberFormatException, made review suggested changes

* added getUploadCount test case
2019-07-08 01:45:11 +05:30
Ashish Kumar
60b1eb1957 Feature/refactor contributions (#3046)
* * Refactored ContributionsListFragment to use RecyclerView
* Added ContributionsPresenter
* Extracted out the cursor to presenter
* Probable fix for #3028

* Improved the logic for cache in ContributionViewHolder

* Some more refactoring

* While displaying images in ContributionsList, check if status is not completed && local uri exists, use that uri to show image

* typo correction in LocalDataSource

* Fixed formatting in ContributionsPresenter

* retain adapter position when orientation changes

* retain child position with its id

* Made ContributionViewHolder not implement ViewHolder

* Code formatting, review suggested changes

* initialise the rv layout managers only when needed

* added test cases for ContributionPresenter

* removed not needed semi colon

* added more java docs and code formatting
2019-07-07 10:24:28 +03:00
PavelAplevich
108e28c89a Removed all hardcoded string in DeleteHelper (#3052)
* Removed hardcoded strings in DeleteHelper

* Revert "Removed hardcoded strings in DeleteHelper"

This reverts commit 4bc55fc3af.

* Removed all hardcoded strings in DeleteHelper.

* fixed test problems

* Correction strings in DeleteHelper

* decision problem with color of info icon #2940

* Correction DeleteHelper and string.xml

* minor fix

* fixed problems in DeleteHelper.java and strings.xml

* and another little fix

* Revert "and another little fix"

This reverts commit fe4ea5255f.

* Revert "decision problem with color of info icon #2940"

This reverts commit 5895cc8785.
2019-07-06 23:25:53 +03:00
translatewiki.net
b71dac33ae Localisation updates from https://translatewiki.net. 2019-07-05 07:01:56 +02:00
PavelAplevich
6fb3331178 Removed hardcoded strings in DeleteHelper (#3047)
* Removed hardcoded strings in DeleteHelper

* Revert "Removed hardcoded strings in DeleteHelper"

This reverts commit 4bc55fc3af.
2019-07-02 14:20:34 +03:00
translatewiki.net
cc92773d46 Localisation updates from https://translatewiki.net. 2019-07-01 09:22:23 +02:00
translatewiki.net
0c3b00244f Localisation updates from https://translatewiki.net. 2019-06-27 18:16:27 +02:00
Vivek Maskara
d7628959a7
Fix bugs in peer review flow (#3039) (#3042)
* Fix bugs in peer review flow

* Fix tests

* Bug fixes

* Fix remaining issues with peer review
2019-06-26 21:31:06 +05:30
Vivek Maskara
31b5179371
Merge branch 'master' into 2.11-release 2019-06-26 21:14:21 +05:30
Vivek Maskara
5dc45a53d3 Fix bugs in peer review flow (#3039)
* Fix bugs in peer review flow

* Fix tests

* Bug fixes

* Fix remaining issues with peer review
2019-06-26 17:40:49 +03:00
sherlockbeard
4ec92c2e7b fixes the string issue (#3041)
* fix strings

* Update activity_achievements.xml
2019-06-26 17:06:41 +03:00
translatewiki.net
17eb6f43ed Localisation updates from https://translatewiki.net. 2019-06-24 16:43:08 +02:00
neslihanturan
dd50e83319 Fixes previous PR - FIX #2918 Add option for default language for file descriptions (#3020)
* FIX #2918 Add option for default language for file descriptions

* navigation menu error fixed and improvement of code quality

* error language description default fixed

* adapter language selected fixed

* local language selected per default in description language

* Use a better string and variable name as required in review 1

* Add comments

* Add previously missing setValue methods so that list item will be chosen along with the summary

* Add missing Javadocs

* Fix capitalization

* Lint and formatting issues

* Rename methods so it's clearer they are to do with languages

* Use default kv store instead of shared preferences variable

* Make sure saved language code from settings activity is handled on init
2019-06-24 21:40:12 +10:00
translatewiki.net
2837748540 Localisation updates from https://translatewiki.net. 2019-06-20 21:28:47 +02:00
translatewiki.net
667372512b Localisation updates from https://translatewiki.net. 2019-06-17 19:14:52 +02:00
Adam Jones
8e35787248 Gradle 5 update (#3023)
* Update to Gradle 5

* Update gradle-play-publisher
2019-06-17 16:52:26 +05:30
neslihanturan
f2a499e8b6
Revert "Update to Gradle 5 (#2860)" (#3019)
This reverts commit 30df3025b6.
2019-06-14 00:18:43 +03:00
Ashish Kumar
7a5dc77057 Refactor uploads (#2981)
* 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)
2019-06-14 01:09:41 +05:30
translatewiki.net
04b051b37a Localisation updates from https://translatewiki.net. 2019-06-13 20:02:26 +02:00
Aadil Ahmed
30df3025b6 Update to Gradle 5 (#2860) 2019-06-13 16:43:51 +01:00
sherlockbeard
6619ccf8d5 removed the hard coded string (#3015)
* removed the hard coded string

* fix
2019-06-12 16:06:25 +03:00
sherlockbeard
09459a3765 user talk and dialog box fix (#3014) 2019-06-12 20:37:22 +09:00
sherlockbeard
6a9018b550 replaced wikidatCreateClaim to wikidataCreateClaim (#3010) 2019-06-11 18:05:12 +09:00
translatewiki.net
69e23b73a8 Localisation updates from https://translatewiki.net. 2019-06-10 20:17:37 +02:00
Vivek Maskara
f855bb5da9 With attribution enabled for OSM (#2997) 2019-06-10 19:28:39 +03:00
Vivek Maskara
8971743479 Fixes #2888: Use Dexter for requesting location permissions (#2925)
* Use dexter to ask for location permissions

* Addressed code review comments
2019-06-08 08:45:30 +03:00
Vivek Maskara
6f9d69e63c Use data client for peer review calls (#2937)
* Use data client for peer review calls

* With java docs

* Optimise API calls and fix tests
2019-06-07 09:59:08 +03:00
translatewiki.net
51e2febc53 Localisation updates from https://translatewiki.net. 2019-06-06 17:52:19 +02:00
Ashish Kumar
06dbfefbe8 BugFix #2993 (#2994)
* Added null check on countResponse in OkHttpJsonApiClient$getWikidataEdits
2019-06-05 16:59:19 +05:30
Ashish Kumar
aabcd0ee79 BugFix Issue #2991 (#2992)
Path Segmens need not be preceeded by "/"
2019-06-05 16:19:24 +05:30