Skip to content

Commit 019307d

Browse files
macgillsVitalyVPinchukashishkumar468vanshikaaroramaskaravivek
committed
commons-app#3222 Merge Structured Data branch into master (commons-app#3553)
* commons-app#3222 Merge master into Structured Data branch, fix conflicts (commons-app#3447) * [WIP] Fixes commons-app#2942. Set 'depicts' automatically for images uploaded via 'Nearby' * Feature/refractor uploads [WIP] (commons-app#2887) * Fix duplicate param information (commons-app#2515) * Bug fix issue commons-app#2476 (commons-app#2526) * Added wikidataEntityID in all db versions, handled db.execSql via method runQuery * Versioning and changelog for v2.10.2 (commons-app#2531) * Update changelog.md * Versioning for v2.10.2 * Update changelog.md * Bugfix/issue 2580 (commons-app#2584) * Corrected string placedholders in certain string files * Corrected string placedholders in certain string files[Bug fix commons-app#2580] * Bug Fix commons-app#2585 (commons-app#2647) * Bug Fix commons-app#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 commons-app#2648 (commons-app#2678) * Bug Fix issue commons-app#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 commons-app#2652 (commons-app#2706) * Addded null check on bookmark before operating on it * BugFix issue commons-app#2711 (commons-app#2712) * Added null checks in OkHttpJsonApiClient$searchImages MwQueryResponse * BugFix commons-app#2718 (commons-app#2719) * Handled null auth cookies * Fix commons-app#2791: NPE when nominating for deletion and leaving screen (commons-app#2792) * Bug Fix issue commons-app#2789 (commons-app#2790) * Handled Illegal State Exception for non existent appropriate view parents in ViewUtils$showShortSnackbar * BugFix commons-app#2720 (commons-app#2831) BugFix deprecated licenes commons-app#2720 * ui fixes, wip, upload * *Issue commons-app#2886, BugFix commons-app#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 * refactored title * ui for depicts * bug fix * basic architecture for depicts * adde architecture components for depicts * [WIP] ApacheHttpClientMediaWikiApi.wikidataEditEntity: JSON param creation uses object instead of string * resolved dagger errors * multilingual captions and next button error resolved * fixed next button issues in depicts fragment * captions and depicts * resolved previous button click issues * fixed bindview error and added multi-captions * replaced description and caption with uploadmediadetail * refactored few classes * modified ui of depicts * minor fixes * Bug fix, reduced the add description edit text clickable bound (commons-app#2973) * moved depicts before categories * replaced previous filename with captions * removed time from filename * added depicts suggestions * [WIP] Wikidata Sandbox (Q4115189) test * changes layout of layout_upload_depicts * changed layout of upload_depicts * code stuck at IO_SCHEDULER * labels and description for depicts activity * Bugfix/uploads (commons-app#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 (commons-app#3001) * Bugfix/uploads (commons-app#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 (commons-app#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 (commons-app#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 (commons-app#3016) * [WIP] Fixed duplicated subscriprion for 'addPropertyP180' * added documentation * fixed issue commons-app#3006 * resolved issue commons-app#3004 * fixed issue with categoryPresenterTest.kt * send captions as labels * fixed issue with the captions * optimised imports * added upload for captions * minor changes * resolved issue with uploading captions * resolved issue with api call * uploading captions to wikibase * added some tests and documentation * undo formatting changes * uploaded captions as labels to wikibase * minor changes * resolved error with spinner adpater * adding captions to local database * Fixed issue commons-app#3035 * fixed issue commons-app#3033 * fixed issue commons-app#3005 * fixed issue commons-app#3005 * added search for depicts * fixed issue with compile time * fixe issue with project build * fixed issue commons-app#3044 * merged uploading depicts into branch * uploading depicts * rebased branch * fixed crash due to depicts * modified depicts interface * Resolve merge conflicts * Fix issues with API calls * Use wikidata token * searching depictions from depicts activity * added some documentation and other changes * fixed crash on selecting depictions * sending wikidataentity id to upload depictions * added changes after review * Fixed issue with next button diabling in media detail activity * added tests for depictions * added all the unit tests and fixed few more issues * showing captions in media details * show captions in media details * added documentations and worked upon review comments * parsing response for depictions * displaying captions and depiction QID in media detail * added documentation * fetching labels from QIDs * captions working perfectly * added documentations and code cleaning * minor changes * minor changes * Showing items in explore * added search via depicts in explore * Added setOffscreenPageLimit in ViewPager * show captions in explore * show captions in home * showing depict images under items * added documentation and code refactoring * enabled pagination in depiction search * added some tests and media deatils in depiction detail activity * fixed bug with back button in media * fixed issue commons-app#3100 * fixed issue commons-app#3098 * fixed issue commons-app#3099 * fixed issue commons-app#3104 and commons-app#3098 * showing captions in place of title in home and explore:media * show captions in explore:depiction image list activity * showing depictions in media details * showing depictions in media details in production flavor * fixed issue commons-app#3108 and commons-app#3107 * fix isse commons-app#3108 * fixed issue commons-app#3110 and commons-app#3112 * fixed issue commons-app#3113 * added documentations * fixed issue commons-app#3076 and commons-app#3109 * added depiction search test * fixed issue commons-app#3113 * fixed issue commons-app#3111 * fixed issue commons-app#3106 * Showing items in explore * minor change * fixed issue commons-app#3118 and some other changes * added MVP in searchdepictionsfragment * added mvp architecture * added MVP architecture to DepictedImagesDetailsActivity * added documentation and some minor changes * added image to depicted item in search depictions * * Use callbacks from renderer to fetch thumbnails * adding fresco to load image in depictions * adding thumbnail image for depictions in upload and explore * pagination issues * fixed issue --(showing previous depiction thumbnail in explore) * Fixed the logic for pagination * hide progress on success of last page * adding sub-items and parent items to search in explore * minor changes for review comments * fixed issue commons-app#3119 * fixed issue commons-app#3130 * changes after review comments * showing child classes for depictions * Showing child items * showing parent classes for depicted items * adding localised search for parent and child items * clicking on any child class or parent class should call the corresponding class items * fixed issue of showing wrong thumbnail for P18 item * fixed issue commons-app#3132 * added test for DepictedImagesPresenter.java * added unit tests for depicted items parent and child classes * removed unused imports and code formatting * fixed issue in search test * deleting unnecessary .attach_pid9313 file * deleting unnecessary .attach_pid9655 file * added SearchDepictionsPresenterTest * changes after review comments * updates for review comments * added more documentations * removed unused code and classes and addressed spacing changes * changes after review * fixed build issues in the app * worked on some review comments * fixed issue:wrong thumbnail appears on wikidata item * minor change * worked on some review changes * worked on review comments * minor change * addressed remaining review comments * replaced hardcoded jpgs with pageIds to fetch captions * added documentation * removed hardcoded extensions and worked on review comments * review comments * [WIP] Added Depicts values for flavors * [WIP] Minor fix * [WIP] Minor fixes * [WIP] Fixed URL * [WIP] Fixed URLs and tokens * Fixed MediaClient: added check for null in continuation store * Fixed Media::from, changed return from null to new Media() * [WIP] Merged with master * Fix commons-app#3254 Displays a proper message in explore section when no result for caption * Updated Mockito to org.mockito:mockito-inline:2.13.0 * [WIP] Fixed tests after merging * [WIP] Fixed some JUnit tests * Fixed 'accessing from wrong thread' error * commons-app#3222 Delete manifest declaration of activity as fragment - stop casting MainActivity to CatgoryImagesCallback - fix tests * Remove unit test not associated with any class - make CategoryPresenterTest more idiomatic * fix compilation errors Co-authored-by: Vitaly V. Pinchuk <vetal.978@gmail.com> Co-authored-by: Ashish Kumar <ashishkumar468@gmail.com> Co-authored-by: vanshikaarora <vanshikaa937@gmail.com> Co-authored-by: Vivek Maskara <maskaravivek@gmail.com> Co-authored-by: Vanshika Arora <34261945+vanshikaarora@users.noreply.github.com> Co-authored-by: Somanshu and Himanshu <somanshS14@gmail.com> * commons-app#3482 Use Room in Structured Data branch - remove unused code (commons-app#3483) * commons-app#3482 Use Room in Structured Data branch - remove unused code * commons-app#3482 Use Room in Structured Data branch - fix unit test compilation * commons-app#3482 Use Room in Structured Data branch - add kdoc * commons-app#3490 Depiction Search in upload shows No Results before it gets results (commons-app#3491) * commons-app#3482 Use Room in Structured Data branch - remove unused code * commons-app#3482 Use Room in Structured Data branch - fix unit test compilation * commons-app#3490 Depiction Search in upload shows No Results before it gets results - stop showing error on subscription * commons-app#3490 Depiction Search in upload shows No Results before it gets results - update test cases * make labels nullable too * fix unit test compilation * commons-app#3222 remove lingering reference to depiction content provider * Fix Crash * commons-app#3222 Merge master into Structured Data branch, fix conflicts - review fixes * Fix method invocations * commons-app#3529 Captions/depictions are not saved to Commons (commons-app#3574) * commons-app#3529 Captions/depictions are not saved to Commons - make copy of list of depictionEntityIds - uncomment editBaseDepictsProperty - refactor upload related classes * commons-app#3529 Captions/depictions are not saved to Commons - fix wrong ArrayList usage * commons-app#3529 Captions/depictions are not saved to Commons - fix test * commons-app#3503 Remove Title/Caption From MediaUploadDetail and only use Caption/Description pairs (commons-app#3578) * commons-app#3529 Captions/depictions are not saved to Commons - make copy of list of depictionEntityIds - uncomment editBaseDepictsProperty - refactor upload related classes * commons-app#3529 Captions/depictions are not saved to Commons - fix wrong ArrayList usage * commons-app#3529 Captions/depictions are not saved to Commons - fix test * commons-app#3503 Remove Title/Caption From MediaUploadDetail and only use Caption/Description pairs - replace title with the first MediaDetail * commons-app#3503 Remove Title/Caption From MediaUploadDetail and only use Caption/Description pairs - restore button disabling * commons-app#3503 Remove Title/Caption From MediaUploadDetail and only use Caption/Description pairs - fix nearby place * fix thumbnail issue 3526 (commons-app#3617) * commons-app#3222 Merge master into Structured Data branch, fix conflicts - fix bad merge * commons-app#3529 Captions/depictions are not saved to Commons (commons-app#3588) * commons-app#3529 Captions/depictions are not saved to Commons - update flow to update appropriate data * commons-app#3529 Captions/depictions are not saved to Commons - fix invoking of setlabel * commons-app#3529 Captions/depictions are not saved to Commons - fix unit tests * commons-app#3529 Captions/depictions are not saved to Commons - use constant for @nAmed * commons-app#3529 Captions/depictions are not saved to Commons - remove captions interface * commons-app#3529 Captions/depictions are not saved to Commons - delete unused Contribution fields - enforce Single Responsibility by using PageContentsCreator * commons-app#3529 Captions/depictions are not saved to Commons - prefix id with M - remove language from url and only add from Field * commons-app#3529 Captions/depictions are not saved to Commons - make edits of depictions and captions sequential * commons-app#3529 Captions/depictions are not saved to Commons - remove unused model fields * commons-app#3529 Captions/depictions are not saved to Commons - weaken type of categories - copy list on Contribution creation * commons-app#3529 Captions/depictions are not saved to Commons - mark Media fields private - weaken types - remove partly implemented fields * commons-app#3529 Captions/depictions are not saved to Commons - add semi colon * commons-app#3529 Captions/depictions are not saved to Commons - fix test * Fix issue 3526 Unlike "Items" tab, "child classes" tab does not display description nor image thumbnail (commons-app#3619) * fix thumbnail issue 3526 * Fix Description issue 3526 * revert changes on this file, not finished with it yet * Fix Description for Child and Parent classes - issue 3526 * Remove conflict text in file * Remove retrofit.HEAD import * Incorporated review comments * Fix issue 3137 (commons-app#3637) * Fix issue 3137 * Remove import Timber * Remove unnecessary space * commons-app#3222 Merge master into Structured Data branch, fix conflicts - revert logging * Fix build * commons-app#3661 No Depictions Selected Dialog has reversed buttons - fix button order * Revert "commons-app#3661 No Depictions Selected Dialog has reversed buttons - fix button order" This reverts commit d8f9809. * commons-app#3222 Merge master into Structured Data branch, fix conflicts - remove unused methods/fields * commons-app#3661 No Depictions Selected Dialog has reversed buttons - fix button order (commons-app#3662) * commons-app#3653 Many Mnull requests - stop requesting captions for null ids (commons-app#3657) * commons-app#3653 Many Mnull requests - stop requesting captions for null ids * commons-app#3653 Many Mnull requests - move log line * commons-app#3633 [structured-data branch] In depictions selection screen, suggest nearby items (commons-app#3650) * commons-app#3633 [structured-data branch] In depictions selection screen, suggest nearby items - for empty search terms show nearby items for depictions * commons-app#3633 [structured-data branch] In depictions selection screen, suggest nearby items - use linear radii progression to search for places * commons-app#3666 Crash when uploading on structured-data branch - revert cleanup of UploadController (commons-app#3670) * commons-app#3222 Merge Structured Data branch into master - fix caption rendering in new UI * commons-app#3222 Merge Structured Data branch into master - upgrade retrofit + okhttp * commons-app#3664 Stop using JsonObject on StructuredData (commons-app#3672) * commons-app#3664 Stop using JsonObject on StructuredData - remove usage in Media classes - remove from depicts client - create partial network models * commons-app#3664 Stop using JsonObject on StructuredData - allow partial mapping of polymorphic models by returning null in typeadapter * commons-app#3664 Stop using JsonObject on StructuredData - use models for editing depicts property * commons-app#3664 Stop using JsonObject on StructuredData - use models for sparql parent query * commons-app#3664 Stop using JsonObject on StructuredData - fix unit test compilation * commons-app#3664 Stop using JsonObject on StructuredData - unify sparql responses * commons-app#3664 Stop using JsonObject on StructuredData - minor cleanup of misnamed/unused/too broad visibility * commons-app#3664 Stop using JsonObject on StructuredData - share variable names and logic for the Sarql queries * commons-app#3664 Stop using JsonObject on StructuredData - add error logging Co-authored-by: Vitaly V. Pinchuk <vetal.978@gmail.com> Co-authored-by: Ashish Kumar <ashishkumar468@gmail.com> Co-authored-by: vanshikaarora <vanshikaa937@gmail.com> Co-authored-by: Vivek Maskara <maskaravivek@gmail.com> Co-authored-by: Vanshika Arora <34261945+vanshikaarora@users.noreply.github.com> Co-authored-by: Somanshu and Himanshu <somanshS14@gmail.com> Co-authored-by: vvijayalakshmi21 <34595292+vvijayalakshmi21@users.noreply.github.com>
1 parent da729fe commit 019307d

File tree

139 files changed

+8606
-4198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+8606
-4198
lines changed

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ dependencies {
1919

2020
implementation project(':wikimedia-data-client')
2121
// Utils
22-
implementation 'com.github.nicolas-raoul:Quadtree:ac16ea8035bf07'
2322
implementation 'in.yuvi:http.fluent:1.3'
2423
implementation 'com.google.code.gson:gson:2.8.5'
25-
implementation 'com.squareup.okhttp3:okhttp:4.2.0'
24+
implementation 'com.squareup.okhttp3:okhttp:4.5.0'
2625
implementation 'com.squareup.okio:okio:2.2.2'
2726
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
2827
implementation 'io.reactivex.rxjava2:rxjava:2.2.3'
@@ -44,6 +43,7 @@ dependencies {
4443
implementation 'com.dinuscxj:circleprogressbar:1.1.1'
4544
implementation 'com.karumi:dexter:5.0.0'
4645
implementation "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"
46+
4747
kapt "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION"
4848

4949
// Logging
@@ -53,7 +53,7 @@ dependencies {
5353
api('com.github.tony19:logback-android-classic:1.1.1-6') {
5454
exclude group: 'com.google.android', module: 'android'
5555
}
56-
implementation "com.squareup.okhttp3:logging-interceptor:4.2.0"
56+
implementation "com.squareup.okhttp3:logging-interceptor:4.5.0"
5757

5858
// Dependency injector
5959
implementation "com.google.dagger:dagger-android-support:$DAGGER_VERSION"
@@ -65,7 +65,7 @@ dependencies {
6565

6666
//Mocking
6767
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0'
68-
testImplementation 'org.mockito:mockito-inline:2.8.47'
68+
testImplementation 'org.mockito:mockito-inline:2.13.0'
6969
testImplementation 'org.mockito:mockito-core:2.23.0'
7070
testImplementation "org.powermock:powermock-module-junit4:2.0.0-beta.5"
7171
testImplementation "org.powermock:powermock-api-mockito2:2.0.0-beta.5"
@@ -108,9 +108,10 @@ dependencies {
108108

109109
//Room
110110
implementation "androidx.room:room-runtime:$ROOM_VERSION"
111-
kapt "androidx.room:room-compiler:$ROOM_VERSION" // For Kotlin use kapt instead of annotationProcessor
112-
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
111+
implementation "androidx.room:room-ktx:$ROOM_VERSION"
113112
implementation "androidx.room:room-rxjava2:$ROOM_VERSION"
113+
kapt "androidx.room:room-compiler:$ROOM_VERSION" // For Kotlin use kapt instead of annotationProcessor
114+
implementation 'com.squareup.retrofit2:retrofit:2.8.1'
114115
testImplementation "androidx.arch.core:core-testing:2.1.0"
115116

116117
// Pref
@@ -208,6 +209,7 @@ android {
208209
buildConfigField "String", "WIKIMEDIA_API_POTD", "\"https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\""
209210
buildConfigField "String", "WIKIMEDIA_API_HOST", "\"https://commons.wikimedia.org/w/api.php\""
210211
buildConfigField "String", "WIKIDATA_API_HOST", "\"https://www.wikidata.org/w/api.php\""
212+
buildConfigField "String", "WIKIDATA_URL", "\"https://www.wikidata.org\""
211213
buildConfigField "String", "WIKIMEDIA_FORGE_API_HOST", "\"https://tools.wmflabs.org/\""
212214
buildConfigField "String", "WIKIMEDIA_CAMPAIGNS_URL", "\"https://raw.githubusercontent.com/commons-app/campaigns/master/campaigns.json\""
213215
buildConfigField "String", "IMAGE_URL_BASE", "\"https://upload.wikimedia.org/wikipedia/commons\""
@@ -229,6 +231,7 @@ android {
229231
buildConfigField "String", "COMMIT_SHA", "\"" + getBuildVersion().toString() + "\""
230232
buildConfigField "String", "TEST_USERNAME", "\"" + System.getenv("test_user_name") + "\""
231233
buildConfigField "String", "TEST_PASSWORD", "\"" + System.getenv("test_user_password") + "\""
234+
buildConfigField "String", "DEPICTS_PROPERTY", "\"P180\""
232235

233236
dimension 'tier'
234237
}
@@ -240,6 +243,7 @@ android {
240243
buildConfigField "String", "WIKIMEDIA_API_POTD", "\"https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\""
241244
buildConfigField "String", "WIKIMEDIA_API_HOST", "\"https://commons.wikimedia.beta.wmflabs.org/w/api.php\""
242245
buildConfigField "String", "WIKIDATA_API_HOST", "\"https://www.wikidata.org/w/api.php\""
246+
buildConfigField "String", "WIKIDATA_URL", "\"https://www.wikidata.org\""
243247
buildConfigField "String", "WIKIMEDIA_FORGE_API_HOST", "\"https://tools.wmflabs.org/\""
244248
buildConfigField "String", "WIKIMEDIA_CAMPAIGNS_URL", "\"https://raw.githubusercontent.com/commons-app/campaigns/master/campaigns_beta_active.json\""
245249
buildConfigField "String", "IMAGE_URL_BASE", "\"https://upload.beta.wmflabs.org/wikipedia/commons\""
@@ -261,6 +265,7 @@ android {
261265
buildConfigField "String", "COMMIT_SHA", "\"" + getBuildVersion().toString() + "\""
262266
buildConfigField "String", "TEST_USERNAME", "\"" + System.getenv("test_user_name") + "\""
263267
buildConfigField "String", "TEST_PASSWORD", "\"" + System.getenv("test_user_password") + "\""
268+
buildConfigField "String", "DEPICTS_PROPERTY", "\"P245962\""
264269

265270
dimension 'tier'
266271
}

app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
1616
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
1717
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
18+
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
1819
<uses-permission android:name="com.google.android.apps.photos.permission.GOOGLE_PHOTOS" />
20+
<uses-permission android:name="android.permission.READ_LOGS" />
1921
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
2022

2123

@@ -118,12 +120,12 @@
118120
android:parentActivityName=".contributions.MainActivity" />
119121

120122
<activity
121-
android:name=".explore.depictions.WikidataItemDetailsActivity"
123+
android:name=".depictions.WikidataItemDetailsActivity"
122124
android:label="@string/title_activity_featured_images"
123125
android:parentActivityName=".contributions.MainActivity" />
124126

125127
<activity
126-
android:name=".explore.ExploreActivity"
128+
android:name=".explore.categories.ExploreActivity"
127129
android:label="@string/title_activity_explore"
128130
android:parentActivityName=".contributions.MainActivity"
129131
android:configChanges="orientation|screenSize|keyboard" />
@@ -137,9 +139,8 @@
137139
/>
138140

139141
<activity
140-
android:name=".profile.ProfileActivity"
141-
android:configChanges="orientation|screenSize|keyboard"
142-
android:label="@string/Profile" />
142+
android:name=".achievements.AchievementsActivity"
143+
android:label="@string/Achievements" />
143144

144145
<activity
145146
android:name=".bookmarks.BookmarksActivity"

app/src/main/java/fr/free/nrw/commons/CommonsApplication.java

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import static org.acra.ReportField.USER_COMMENT;
1010

1111
import android.annotation.SuppressLint;
12+
import android.app.Application;
1213
import android.app.NotificationChannel;
1314
import android.app.NotificationManager;
1415
import android.content.Context;
@@ -17,13 +18,13 @@
1718
import android.os.Process;
1819
import android.util.Log;
1920
import androidx.annotation.NonNull;
20-
import androidx.multidex.MultiDexApplication;
2121
import com.facebook.drawee.backends.pipeline.Fresco;
2222
import com.facebook.imagepipeline.core.ImagePipeline;
2323
import com.facebook.imagepipeline.core.ImagePipelineConfig;
2424
import com.mapbox.mapboxsdk.Mapbox;
2525
import com.squareup.leakcanary.LeakCanary;
2626
import com.squareup.leakcanary.RefWatcher;
27+
2728
import fr.free.nrw.commons.auth.SessionManager;
2829
import fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsDao;
2930
import fr.free.nrw.commons.bookmarks.pictures.BookmarkPicturesDao;
@@ -36,7 +37,6 @@
3637
import fr.free.nrw.commons.kvstore.JsonKvStore;
3738
import fr.free.nrw.commons.logging.FileLoggingTree;
3839
import fr.free.nrw.commons.logging.LogUtils;
39-
import fr.free.nrw.commons.media.CustomOkHttpNetworkFetcher;
4040
import fr.free.nrw.commons.settings.Prefs;
4141
import fr.free.nrw.commons.upload.FileUtils;
4242
import fr.free.nrw.commons.utils.ConfigUtils;
@@ -77,20 +77,11 @@
7777
resCommentPrompt = R.string.crash_dialog_comment_prompt
7878
)
7979

80-
public class CommonsApplication extends MultiDexApplication {
81-
82-
public static final String IS_LIMITED_CONNECTION_MODE_ENABLED = "is_limited_connection_mode_enabled";
83-
@Inject
84-
SessionManager sessionManager;
85-
@Inject
86-
DBOpenHelper dbOpenHelper;
87-
88-
@Inject
89-
@Named("default_preferences")
90-
JsonKvStore defaultPrefs;
80+
public class CommonsApplication extends Application {
81+
@Inject SessionManager sessionManager;
82+
@Inject DBOpenHelper dbOpenHelper;
9183

92-
@Inject
93-
CustomOkHttpNetworkFetcher customOkHttpNetworkFetcher;
84+
@Inject @Named("default_preferences") JsonKvStore defaultPrefs;
9485

9586
/**
9687
* Constants begin
@@ -157,7 +148,6 @@ public void onCreate() {
157148

158149
// Set DownsampleEnabled to True to downsample the image in case it's heavy
159150
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
160-
.setNetworkFetcher(customOkHttpNetworkFetcher)
161151
.setDownsampleEnabled(true)
162152
.build();
163153
try {

0 commit comments

Comments
 (0)