Reversed completed task ordering.

pull/14/head
Tim Su 16 years ago
parent 33ea2a1f43
commit da02524fa9

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.timsu.astrid" package="com.timsu.astrid"
android:versionCode="27" android:versionCode="28"
android:versionName="1.9.2"> android:versionName="1.9.3">
<uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.VIBRATE"/>

@ -92,6 +92,7 @@ public class TaskModelForList extends AbstractTaskModel {
System.currentTimeMillis())/1000/3600; System.currentTimeMillis())/1000/3600;
if(hoursLeft < 5*24) if(hoursLeft < 5*24)
weight += (hoursLeft - 5*24); weight += (hoursLeft - 5*24);
weight -= 20;
} }
// looming preferred deadline // looming preferred deadline
@ -100,15 +101,16 @@ public class TaskModelForList extends AbstractTaskModel {
System.currentTimeMillis())/1000/3600; System.currentTimeMillis())/1000/3600;
if(hoursLeft < 5*24) if(hoursLeft < 5*24)
weight += (hoursLeft - 5*24)/2; weight += (hoursLeft - 5*24)/2;
weight -= 10;
} }
// bubble completed tasks to the bottom // bubble completed tasks to the bottom
if(isTaskCompleted()) { if(isTaskCompleted()) {
if(getCompletionDate() == null) if(getCompletionDate() == null)
weight += 5e6; weight += 20000;
else else
weight = (int)Math.max(5e6 - (System.currentTimeMillis() - weight = (int)Math.max(10000 + (System.currentTimeMillis() -
getCompletionDate().getTime()) / 1000, 5000); getCompletionDate().getTime()) / 1000, 10000);
return weight; return weight;
} }

Loading…
Cancel
Save