mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Trigger Modifications Sync right after all uploads are done
Bug: 46935
This commit is contained in:
parent
91e0f8cff2
commit
f9961381ce
1 changed files with 4 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import java.io.*;
|
|||
import java.util.Date;
|
||||
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
import org.mediawiki.api.*;
|
||||
import in.yuvi.http.fluent.ProgressListener;
|
||||
|
||||
|
|
@ -14,6 +15,7 @@ import android.util.*;
|
|||
import android.widget.*;
|
||||
|
||||
import org.wikimedia.commons.contributions.*;
|
||||
import org.wikimedia.commons.modifications.ModificationsContentProvider;
|
||||
|
||||
public class UploadService extends HandlerService<Contribution> {
|
||||
|
||||
|
|
@ -247,6 +249,8 @@ public class UploadService extends HandlerService<Contribution> {
|
|||
} finally {
|
||||
toUpload--;
|
||||
if(toUpload == 0) {
|
||||
// Sync modifications right after all uplaods are processed
|
||||
ContentResolver.requestSync(((CommonsApplication) getApplicationContext()).getCurrentAccount(), ModificationsContentProvider.AUTHORITY, new Bundle());
|
||||
stopForeground(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue