mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Sort images in my contributions as people would expect them to
This commit is contained in:
parent
006558ccd3
commit
9724bfd8f5
2 changed files with 10 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ import org.wikimedia.commons.Media;
|
||||||
public class Contribution extends Media {
|
public class Contribution extends Media {
|
||||||
|
|
||||||
// No need to be bitwise - they're mutually exclusive
|
// No need to be bitwise - they're mutually exclusive
|
||||||
public static final int STATE_COMPLETED = 0;
|
public static final int STATE_COMPLETED = -1;
|
||||||
public static final int STATE_QUEUED = 1;
|
public static final int STATE_QUEUED = 1;
|
||||||
public static final int STATE_IN_PROGRESS = 2;
|
public static final int STATE_IN_PROGRESS = 2;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,15 @@ public class ContributionsActivity extends AuthenticatedActivity implements Load
|
||||||
};
|
};
|
||||||
|
|
||||||
private String CONTRIBUTION_SELECTION = "";
|
private String CONTRIBUTION_SELECTION = "";
|
||||||
private String CONTRIBUTION_SORT = Contribution.Table.COLUMN_TIMESTAMP + " DESC";
|
/*
|
||||||
|
This sorts in the following order:
|
||||||
|
Currently Uploading
|
||||||
|
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_TIMESTAMP + " * " + Contribution.Table.COLUMN_STATE + ")";
|
||||||
|
|
||||||
private BroadcastReceiver messageReceiver = new BroadcastReceiver() {
|
private BroadcastReceiver messageReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue