Merge pull request #29 from misaochan/master

Minor changes
This commit is contained in:
Nicolas Raoul 2015-11-09 14:26:11 +09:00
commit af15101d60
4 changed files with 18 additions and 17 deletions

2
.gitignore vendored
View file

@ -3,3 +3,5 @@ commons/gen-external-apklibs/*
commons/target/*
out/*
*.iml
*.ipr
*.iws

View file

@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fr.free.nrw.commons"
android:versionCode="18"
android:versionName="1.3" >
android:versionCode="20"
android:versionName="1.4" >
<uses-sdk
android:minSdkVersion="9"

View file

@ -17,7 +17,6 @@ import android.support.v4.app.NavUtils;
import fr.free.nrw.commons.*;
import fr.free.nrw.commons.WelcomeActivity;
import fr.free.nrw.commons.campaigns.CampaignsContentProvider;
import fr.free.nrw.commons.modifications.ModificationsContentProvider;
import fr.free.nrw.commons.CommonsApplication;
import fr.free.nrw.commons.EventLog;
@ -72,7 +71,6 @@ public class LoginActivity extends AccountAuthenticatorActivity {
// FIXME: If the user turns it off, it shouldn't be auto turned back on
ContentResolver.setSyncAutomatically(account, ContributionsContentProvider.AUTHORITY, true); // Enable sync by default!
ContentResolver.setSyncAutomatically(account, ModificationsContentProvider.AUTHORITY, true); // Enable sync by default!
ContentResolver.setSyncAutomatically(account, CampaignsContentProvider.AUTHORITY, true); // Enable sync by default!
context.finish();
} else {
int response;

View file

@ -39,15 +39,27 @@ public class ContributionsActivity
private Cursor allContributions;
private ContributionsListFragment contributionsList;
private MediaDetailPagerFragment mediaDetails;
private UploadService uploadService;
private boolean isUploadServiceConnected;
private ArrayList<DataSetObserver> observersWaitingForLoad = new ArrayList<DataSetObserver>();
private String CONTRIBUTION_SELECTION = "";
/*
This sorts in the following order:
Currently Uploading
Failed (Sorted in ascending order of time added - FIFO)
Queued to Upload (Sorted in ascending order of time added - FIFO)
Completed (Sorted in descending order of time added)
This is why Contribution.STATE_COMPLETED is -1.
*/
private String CONTRIBUTION_SORT = Contribution.Table.COLUMN_STATE + " DESC, " + Contribution.Table.COLUMN_UPLOADED + " DESC , (" + Contribution.Table.COLUMN_TIMESTAMP + " * " + Contribution.Table.COLUMN_STATE + ")";
public ContributionsActivity() {
super(WikiAccountAuthenticator.COMMONS_ACCOUNT_TYPE);
}
private UploadService uploadService;
private boolean isUploadServiceConnected;
private ServiceConnection uploadServiceConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName componentName, IBinder binder) {
uploadService = (UploadService) ((HandlerService.HandlerServiceLocalBinder)binder).getService();
@ -70,17 +82,6 @@ public class ContributionsActivity
}
}
private String CONTRIBUTION_SELECTION = "";
/*
This sorts in the following order:
Currently Uploading
Failed (Sorted in ascending order of time added - FIFO)
Queued to Upload (Sorted in ascending order of time added - FIFO)
Completed (Sorted in descending order of time added)
This is why Contribution.STATE_COMPLETED is -1.
*/
private String CONTRIBUTION_SORT = Contribution.Table.COLUMN_STATE + " DESC, " + Contribution.Table.COLUMN_UPLOADED + " DESC , (" + Contribution.Table.COLUMN_TIMESTAMP + " * " + Contribution.Table.COLUMN_STATE + ")";
@Override
protected void onResume() {