mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Use a SyncProvider to sync all Campaigns
The SyncService constantly deletes and re-creates the campaigns in the background to make sure they are up to date FIXME: Handle deleted or renamed campaigns Change-Id: I5d03995ada219481ea38887a8ea6d59fa11d2ac8
This commit is contained in:
parent
a56fa072a1
commit
2503f54731
13 changed files with 551 additions and 136 deletions
|
|
@ -5,9 +5,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/campaignsListFragment"
|
||||
class="org.wikimedia.commons.campaigns.CampaignsListFragment"
|
||||
<ListView
|
||||
android:id="@+id/campaignsList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -102,4 +102,5 @@
|
|||
<string name="welcome_copyright_subtext">Avoid copyrighted materials you found from the Internet as well as images of posters, book covers, etc.</string>
|
||||
<string name="welcome_final_text">You think you got it?</string>
|
||||
<string name="welcome_final_button_text">Yes!</string>
|
||||
<string name="provider_campaigns">Campaigns</string>
|
||||
</resources>
|
||||
|
|
|
|||
9
commons/res/xml/campaigns_sync_adapter.xml
Normal file
9
commons/res/xml/campaigns_sync_adapter.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:contentAuthority="org.wikimedia.commons.campaigns.contentprovider"
|
||||
android:accountType="org.wikimedia.commons"
|
||||
android:supportsUploading="false"
|
||||
android:userVisible="true"
|
||||
android:isAlwaysSyncable="true"
|
||||
/>
|
||||
Loading…
Add table
Add a link
Reference in a new issue