Deprecated and removed some references to User.EMAIL

pull/14/head
Sam Bosley 12 years ago
parent b2daa373b0
commit 74dd1b3075

@ -55,7 +55,7 @@ public final class User extends RemoteModel {
TABLE, "last_name");
/** User Email */
public static final StringProperty EMAIL = new StringProperty(
@Deprecated public static final StringProperty EMAIL = new StringProperty(
TABLE, "email");
/** User picture */

@ -45,7 +45,6 @@ import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.andlib.sql.Criterion;
import com.todoroo.andlib.sql.Functions;
import com.todoroo.andlib.sql.Order;
import com.todoroo.andlib.sql.Query;
import com.todoroo.andlib.utility.DialogUtilities;
@ -454,9 +453,7 @@ public class EditPeopleControlSet extends PopupControlSet {
private ArrayList<JSONObject> getAstridFriends() {
ArrayList<JSONObject> astridFriends = new ArrayList<JSONObject>();
TodorooCursor<User> users = userDao.query(Query.select(User.PROPERTIES)
.orderBy(Order.asc(Functions.caseStatement(Criterion.or(User.NAME.isNull(), User.NAME.eq("")), //$NON-NLS-1$
Functions.upper(User.EMAIL),
Functions.upper(User.NAME)))));
.orderBy(Order.asc(User.FIRST_NAME), Order.asc(User.LAST_NAME), Order.asc(User.NAME), Order.asc(User.EMAIL)));
try {
User user = new User();
for (users.moveToFirst(); !users.isAfterLast(); users.moveToNext()) {

@ -192,7 +192,6 @@ public class NameMaps {
USER_COLUMNS_LOCAL_TO_SERVER = new HashMap<String, String>();
putUserPropertyToServerName(User.UUID, "uuid", false);
putUserPropertyToServerName(User.EMAIL, "email", false);
putUserPropertyToServerName(User.PICTURE, "picture", false);
putUserPropertyToServerName(User.FIRST_NAME, "first_name", false);
putUserPropertyToServerName(User.LAST_NAME, "last_name", false);

@ -225,7 +225,7 @@ public class CalendarAlarmListCreator extends Activity {
String email = emails.get(index);
if (emailsToUsers.containsKey(email)) {
User u = emailsToUsers.get(email);
String userName = u.getValue(User.NAME);
String userName = u.getDisplayName();
if (!TextUtils.isEmpty(userName))
return userName;
}

@ -58,7 +58,7 @@ public class PeopleFilterExposer extends BroadcastReceiver {
TodorooCursor<User> users = PluginServices.getUserDao().query(Query.select(User.PROPERTIES)
.where(Criterion.not(Criterion.or(User.STATUS.eq(User.STATUS_BLOCKED),
User.STATUS.eq(User.STATUS_IGNORED))))
.orderBy(Order.asc(User.NAME), Order.asc(User.EMAIL)));
.orderBy(Order.asc(User.FIRST_NAME), Order.asc(User.LAST_NAME), Order.asc(User.NAME)));
try {
List<FilterListItem> items = new ArrayList<FilterListItem>();
items.add(mySharedTasks(context));

Loading…
Cancel
Save