Merge branch 'master' into dev

pull/14/head
Tim Su 16 years ago
commit 385db6235f

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.timsu.astrid"
android:versionName="3.0.6" android:versionCode="145"
android:versionName="3.0.7" android:versionCode="146"
android:installLocation="auto">
<!-- ================================================== Used Permissions = -->

@ -163,9 +163,22 @@ public class DateUtilities {
@SuppressWarnings("nls")
public static SimpleDateFormat getDateFormatWithWeekday(Context context) {
try {
return new SimpleDateFormat("EEE, " + getDateFormatString(context));
return new SimpleDateFormat("EEEE, " + getDateFormatString(context));
} catch (Exception e) {
return new SimpleDateFormat("EEE, d MMM yyyy");
return new SimpleDateFormat("EEEE, d MMM yyyy");
}
}
/**
* @return date format as getDateFormat with weekday
*/
@SuppressWarnings("nls")
public static SimpleDateFormat getDateWithTimeAndWeekday(Context context) {
try {
return new SimpleDateFormat("EEEE, " + getDateFormatString(context)
+ " " + getTimeFormatString(context));
} catch (Exception e) {
return new SimpleDateFormat("EEEE, d MMM yyyy H:mm");
}
}

@ -38,6 +38,7 @@ import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.astrid.activity.TaskListActivity;
import com.todoroo.astrid.api.Filter;
import com.todoroo.astrid.dao.TaskDao.TaskCriteria;
import com.todoroo.astrid.utility.Preferences;
/**
* This activity is launched when a user opens up a notification from the
@ -95,7 +96,13 @@ public class NotificationActivity extends TaskListActivity implements OnTimeSetL
getLayoutInflater().inflate(R.layout.notification_control, parent, true);
String reminder = Notifications.getRandomReminder(getResources().getStringArray(R.array.reminder_responses));
((TextView)findViewById(R.id.reminderLabel)).setText(reminder);
if(Preferences.getBoolean(R.string.p_rmd_nagging, true))
((TextView)findViewById(R.id.reminderLabel)).setText(reminder);
else {
findViewById(R.id.reminderLabel).setVisibility(View.GONE);
findViewById(R.id.astridIcon).setVisibility(View.GONE);
}
// set up listeners
((Button)findViewById(R.id.goAway)).setOnClickListener(new OnClickListener() {

@ -76,8 +76,10 @@ public class Notifications extends BroadcastReceiver {
reminder = getRandomReminder(r.getStringArray(R.array.reminders_due));
else if(type == ReminderService.TYPE_SNOOZE)
reminder = getRandomReminder(r.getStringArray(R.array.reminders_snooze));
else
else if(Preferences.getBoolean(R.string.p_rmd_nagging, true))
reminder = getRandomReminder(r.getStringArray(R.array.reminders));
else
reminder = ""; //$NON-NLS-1$
if(!showTaskNotification(id, type, reminder)) {
notificationManager.cancel((int)id);

@ -13,6 +13,7 @@ import android.content.res.Resources;
import android.database.Cursor;
import android.graphics.Paint;
import android.text.Html;
import android.text.util.Linkify;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater;
@ -278,14 +279,14 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
String dateValue;
Date dueDateAsDate = DateUtilities.unixtimeToDate(dueDate);
if (task.hasDueTime()) {
dateValue = DateUtilities.getDateWithTimeFormat(activity).format(dueDateAsDate);
dateValue = DateUtilities.getDateWithTimeAndWeekday(activity).format(dueDateAsDate);
} else {
dateValue = DateUtilities.getDateFormat(activity).format(dueDateAsDate);
dateValue = DateUtilities.getDateFormatWithWeekday(activity).format(dueDateAsDate);
}
dueDateView.setText(dateValue);
setVisibility(dueDateView);
} else if(task.isCompleted()) {
String dateValue = DateUtilities.getDateFormat(activity).format(task.getValue(Task.COMPLETION_DATE));
String dateValue = DateUtilities.getDateFormatWithWeekday(activity).format(task.getValue(Task.COMPLETION_DATE));
dueDateView.setText(r.getString(R.string.TAd_completed, dateValue));
dueDateView.setTextAppearance(activity, R.style.TextAppearance_TAd_ItemDetails);
setVisibility(dueDateView);
@ -434,6 +435,7 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
view.setText(Html.fromHtml(string.trim().replace("\n", "<br>")));
else
view.setText(string.trim());
Linkify.addLinks(view, Linkify.ALL);
}
@Override

@ -56,14 +56,17 @@ public final class UpgradeService {
"If you liked the old version, you can also go back by " +
"<a href='http://bit.ly/oldastrid'>clicking here</a>",
});
else if(from <= 144)
if(from > 135 && from <= 144)
newVersionString(changeLog, "3.0.6 (8/4/10)", new String[] {
"This update contains for free all of the " +
"powerpack's features for evaluation purposes",
"Fixed widget not updating when tasks are edited",
"Added a setting for displaying task notes",
"If you liked the old version, you can also go back by " +
"<a href='http://bit.ly/oldastrid'>clicking here</a>",
"Added a setting for displaying task notes in the list",
});
if(from > 135 && from <= 145)
newVersionString(changeLog, "3.0.7 (8/5/10)", new String[] {
"Linkify phone numbers, e-mails, and web pages",
"Made the 'Astrid Notifications' setting in the menu work",
});
if(changeLog.length() == 0)

Loading…
Cancel
Save