Skip to content

Commit 942cef5

Browse files
macgillsVitalyVPinchukashishkumar468vanshikaaroramaskaravivek
authored
#3222 Merge master into Structured Data branch, fix conflicts (#3447)
* [WIP] Fixes #2942. Set 'depicts' automatically for images uploaded via 'Nearby' * 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 * 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 (#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 (#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) * [WIP] Fixed duplicated subscriprion for 'addPropertyP180' * added documentation * fixed issue #3006 * resolved issue #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 #3035 * fixed issue #3033 * fixed issue #3005 * fixed issue #3005 * added search for depicts * fixed issue with compile time * fixe issue with project build * fixed issue #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 #3100 * fixed issue #3098 * fixed issue #3099 * fixed issue #3104 and #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 #3108 and #3107 * fix isse #3108 * fixed issue #3110 and #3112 * fixed issue #3113 * added documentations * fixed issue #3076 and #3109 * added depiction search test * fixed issue #3113 * fixed issue #3111 * fixed issue #3106 * Showing items in explore * minor change * fixed issue #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 #3119 * fixed issue #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 #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 #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 * #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>
1 parent 99c6f5f commit 942cef5

File tree

144 files changed

+7189
-277
lines changed

Some content is hidden

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

144 files changed

+7189
-277
lines changed

app/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ dependencies {
4242
implementation 'com.dinuscxj:circleprogressbar:1.1.1'
4343
implementation 'com.karumi:dexter:5.0.0'
4444
implementation "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"
45+
4546
kapt "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION"
4647

4748
// Logging
@@ -63,7 +64,7 @@ dependencies {
6364

6465
//Mocking
6566
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0'
66-
testImplementation 'org.mockito:mockito-inline:2.8.47'
67+
testImplementation 'org.mockito:mockito-inline:2.13.0'
6768
testImplementation 'org.mockito:mockito-core:2.23.0'
6869
testImplementation "org.powermock:powermock-module-junit4:2.0.0-beta.5"
6970
testImplementation "org.powermock:powermock-api-mockito2:2.0.0-beta.5"
@@ -200,6 +201,7 @@ android {
200201
buildConfigField "String", "WIKIMEDIA_API_POTD", "\"https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\""
201202
buildConfigField "String", "WIKIMEDIA_API_HOST", "\"https://commons.wikimedia.org/w/api.php\""
202203
buildConfigField "String", "WIKIDATA_API_HOST", "\"https://www.wikidata.org/w/api.php\""
204+
buildConfigField "String", "WIKIDATA_URL", "\"https://www.wikidata.org\""
203205
buildConfigField "String", "WIKIMEDIA_FORGE_API_HOST", "\"https://tools.wmflabs.org/\""
204206
buildConfigField "String", "WIKIMEDIA_CAMPAIGNS_URL", "\"https://raw.githubusercontent.com/commons-app/campaigns/master/campaigns.json\""
205207
buildConfigField "String", "IMAGE_URL_BASE", "\"https://upload.wikimedia.org/wikipedia/commons\""
@@ -215,12 +217,14 @@ android {
215217
buildConfigField "String", "CONTRIBUTION_AUTHORITY", "\"fr.free.nrw.commons.contributions.contentprovider\""
216218
buildConfigField "String", "MODIFICATION_AUTHORITY", "\"fr.free.nrw.commons.modifications.contentprovider\""
217219
buildConfigField "String", "CATEGORY_AUTHORITY", "\"fr.free.nrw.commons.categories.contentprovider\""
220+
buildConfigField "String", "DEPICTION_AUTHORITY", "\"fr.free.nrw.commons.depicts.contentprovider\""
218221
buildConfigField "String", "RECENT_SEARCH_AUTHORITY", "\"fr.free.nrw.commons.explore.recentsearches.contentprovider\""
219222
buildConfigField "String", "BOOKMARK_AUTHORITY", "\"fr.free.nrw.commons.bookmarks.contentprovider\""
220223
buildConfigField "String", "BOOKMARK_LOCATIONS_AUTHORITY", "\"fr.free.nrw.commons.bookmarks.locations.contentprovider\""
221224
buildConfigField "String", "COMMIT_SHA", "\"" + getBuildVersion().toString() + "\""
222225
buildConfigField "String", "TEST_USERNAME", "\"" + System.getenv("test_user_name") + "\""
223226
buildConfigField "String", "TEST_PASSWORD", "\"" + System.getenv("test_user_password") + "\""
227+
buildConfigField "String", "DEPICTS_PROPERTY", "\"P180\""
224228

225229
dimension 'tier'
226230
}
@@ -232,6 +236,7 @@ android {
232236
buildConfigField "String", "WIKIMEDIA_API_POTD", "\"https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\""
233237
buildConfigField "String", "WIKIMEDIA_API_HOST", "\"https://commons.wikimedia.beta.wmflabs.org/w/api.php\""
234238
buildConfigField "String", "WIKIDATA_API_HOST", "\"https://www.wikidata.org/w/api.php\""
239+
buildConfigField "String", "WIKIDATA_URL", "\"https://www.wikidata.org\""
235240
buildConfigField "String", "WIKIMEDIA_FORGE_API_HOST", "\"https://tools.wmflabs.org/\""
236241
buildConfigField "String", "WIKIMEDIA_CAMPAIGNS_URL", "\"https://raw.githubusercontent.com/commons-app/campaigns/master/campaigns_beta_active.json\""
237242
buildConfigField "String", "IMAGE_URL_BASE", "\"https://upload.beta.wmflabs.org/wikipedia/commons\""
@@ -247,12 +252,14 @@ android {
247252
buildConfigField "String", "CONTRIBUTION_AUTHORITY", "\"fr.free.nrw.commons.beta.contributions.contentprovider\""
248253
buildConfigField "String", "MODIFICATION_AUTHORITY", "\"fr.free.nrw.commons.beta.modifications.contentprovider\""
249254
buildConfigField "String", "CATEGORY_AUTHORITY", "\"fr.free.nrw.commons.beta.categories.contentprovider\""
255+
buildConfigField "String", "DEPICTION_AUTHORITY", "\"fr.free.nrw.commons.beta.depicts.contentprovider\""
250256
buildConfigField "String", "RECENT_SEARCH_AUTHORITY", "\"fr.free.nrw.commons.beta.explore.recentsearches.contentprovider\""
251257
buildConfigField "String", "BOOKMARK_AUTHORITY", "\"fr.free.nrw.commons.beta.bookmarks.contentprovider\""
252258
buildConfigField "String", "BOOKMARK_LOCATIONS_AUTHORITY", "\"fr.free.nrw.commons.beta.bookmarks.locations.contentprovider\""
253259
buildConfigField "String", "COMMIT_SHA", "\"" + getBuildVersion().toString() + "\""
254260
buildConfigField "String", "TEST_USERNAME", "\"" + System.getenv("test_user_name") + "\""
255261
buildConfigField "String", "TEST_PASSWORD", "\"" + System.getenv("test_user_password") + "\""
262+
buildConfigField "String", "DEPICTS_PROPERTY", "\"P245962\""
256263

257264
dimension 'tier'
258265
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package fr.free.nrw.commons
2+
3+
import androidx.test.runner.AndroidJUnit4
4+
import org.junit.Rule
5+
import org.junit.runner.RunWith
6+
import android.net.Uri
7+
import androidx.test.espresso.Espresso
8+
import androidx.test.espresso.action.ViewActions
9+
import androidx.test.espresso.matcher.ViewMatchers
10+
import androidx.test.rule.ActivityTestRule
11+
import fr.free.nrw.commons.upload.UploadActivity
12+
import org.hamcrest.Matchers
13+
import org.hamcrest.core.AllOf
14+
import org.junit.Test
15+
16+
@RunWith(AndroidJUnit4::class)
17+
class DepictionSearchTest {
18+
@get:Rule
19+
var activityRule = ActivityTestRule(UploadActivity::class.java)
20+
21+
@Test
22+
fun TestForCaptionsAndDepictions() {
23+
val imageUri = Uri.parse("file://mnt/sdcard/image.jpg")
24+
25+
// Build a result to return from the Camera app
26+
27+
28+
// Stub out the File picker. When an intent is sent to the File picker, this tells
29+
// Espresso to respond with the ActivityResult we just created
30+
31+
Espresso.onView(ViewMatchers.withId(R.id.caption_item_edit_text))
32+
.perform(ViewActions.typeText("caption in english"))
33+
Espresso.onView(ViewMatchers.withId(R.id.description_item_edit_text))
34+
.perform(ViewActions.typeText("description in english"))
35+
Espresso.onView(ViewMatchers.withId(R.id.spinner_description_languages))
36+
.perform(ViewActions.click())
37+
Espresso.onView(ViewMatchers.withId(R.id.spinner_description_languages)).perform(ViewActions.click());
38+
Espresso.onData(AllOf.allOf(Matchers.anything("spinner text"))).atPosition(1).perform(ViewActions.click());
39+
Espresso.onView(ViewMatchers.withId(R.id.caption_item_edit_text))
40+
.perform(ViewActions.typeText("caption in some other language"))
41+
Espresso.onView(ViewMatchers.withId(R.id.description_item_edit_text))
42+
.perform(ViewActions.typeText("description in some other language"))
43+
Espresso.onView(ViewMatchers.withId(R.id.btn_next))
44+
.perform(ViewActions.click())
45+
}
46+
}

app/src/androidTest/java/fr/free/nrw/commons/UploadActivityTest.kt

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
package fr.free.nrw.commons
22

3+
import android.net.Uri
4+
import androidx.test.espresso.Espresso
5+
import androidx.test.espresso.action.ViewActions
6+
import androidx.test.espresso.intent.Intents
7+
import androidx.test.espresso.intent.matcher.IntentMatchers
8+
import androidx.test.espresso.matcher.ViewMatchers
39
import androidx.test.rule.ActivityTestRule
410
import androidx.test.runner.AndroidJUnit4
511
import fr.free.nrw.commons.upload.UploadActivity
12+
import fr.free.nrw.commons.upload.depicts.DepictsFragment
13+
import org.hamcrest.Matchers
14+
import org.hamcrest.core.AllOf
615
import org.junit.Rule
716
import org.junit.Test
817
import org.junit.runner.RunWith
@@ -16,4 +25,25 @@ class UploadActivityTest {
1625
fun orientationChange() {
1726
UITestHelper.changeOrientation(activityRule)
1827
}
19-
}
28+
29+
@Test
30+
fun TestForCaptionsAndDepictions() {
31+
val imageUri = Uri.parse("file://mnt/sdcard/image.jpg")
32+
33+
Espresso.onView(ViewMatchers.withId(R.id.caption_item_edit_text))
34+
.perform(ViewActions.typeText("caption in english"))
35+
Espresso.onView(ViewMatchers.withId(R.id.description_item_edit_text))
36+
.perform(ViewActions.typeText("description in english"))
37+
Espresso.onView(ViewMatchers.withId(R.id.spinner_description_languages))
38+
.perform(ViewActions.click())
39+
Espresso.onView(ViewMatchers.withId(R.id.spinner_description_languages)).perform(ViewActions.click());
40+
Espresso.onData(AllOf.allOf(Matchers.anything("spinner text"))).atPosition(1).perform(ViewActions.click());
41+
Espresso.onView(ViewMatchers.withId(R.id.caption_item_edit_text))
42+
.perform(ViewActions.typeText("caption in some other language"))
43+
Espresso.onView(ViewMatchers.withId(R.id.description_item_edit_text))
44+
.perform(ViewActions.typeText("description in some other language"))
45+
Espresso.onView(ViewMatchers.withId(R.id.btn_next))
46+
.perform(ViewActions.click())
47+
Intents.intended(IntentMatchers.hasComponent(DepictsFragment::class.java.name))
48+
}
49+
}

app/src/main/AndroidManifest.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@
119119
android:label="@string/title_activity_featured_images"
120120
android:parentActivityName=".contributions.MainActivity" />
121121

122+
<activity
123+
android:name=".depictions.WikidataItemDetailsActivity"
124+
android:label="@string/title_activity_featured_images"
125+
android:parentActivityName=".contributions.MainActivity" />
126+
122127
<activity
123128
android:name=".explore.categories.ExploreActivity"
124129
android:label="@string/title_activity_explore"
@@ -180,6 +185,13 @@
180185
android:label="@string/provider_categories"
181186
android:syncable="false" />
182187

188+
<provider
189+
android:authorities="${applicationId}.depicts.contentprovider"
190+
android:name=".upload.structure.depictions.DepictsContentProvider"
191+
android:exported="false"
192+
android:label="@string/provider_depictions"
193+
android:syncable="false"/>
194+
183195
<provider
184196
android:name=".explore.recentsearches.RecentSearchesContentProvider"
185197
android:authorities="${applicationId}.explore.recentsearches.contentprovider"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import fr.free.nrw.commons.logging.LogUtils;
5454
import fr.free.nrw.commons.settings.Prefs;
5555
import fr.free.nrw.commons.upload.FileUtils;
56+
import fr.free.nrw.commons.upload.structure.depictions.DepictionDao;
5657
import fr.free.nrw.commons.utils.ConfigUtils;
5758
import io.reactivex.android.schedulers.AndroidSchedulers;
5859
import io.reactivex.internal.functions.Functions;
@@ -311,6 +312,7 @@ private void updateAllDatabases() {
311312
SQLiteDatabase db = dbOpenHelper.getWritableDatabase();
312313

313314
CategoryDao.Table.onDelete(db);
315+
DepictionDao.Table.onDelete(db);
314316
dbOpenHelper.deleteTable(db,CONTRIBUTIONS_TABLE);//Delete the contributions table in the existing db on older versions
315317
appDatabase.getContributionDao().deleteAll();
316318
BookmarkPicturesDao.Table.onDelete(db);

0 commit comments

Comments
 (0)