|
|
|
@ -18,7 +18,6 @@ import com.todoroo.astrid.sync.SyncContainer;
|
|
|
|
|
public class ProducteevTaskContainer extends SyncContainer {
|
|
|
|
|
|
|
|
|
|
public Metadata pdvTask;
|
|
|
|
|
// private Resources res;
|
|
|
|
|
|
|
|
|
|
public ProducteevTaskContainer(Task task, ArrayList<Metadata> metadata, Metadata pdvTask) {
|
|
|
|
|
this.task = task;
|
|
|
|
@ -32,7 +31,6 @@ public class ProducteevTaskContainer extends SyncContainer {
|
|
|
|
|
@SuppressWarnings("nls")
|
|
|
|
|
public ProducteevTaskContainer(Task task, ArrayList<Metadata> metadata, JSONObject remoteTask) {
|
|
|
|
|
this(task, metadata, new Metadata());
|
|
|
|
|
// res = ContextManager.getContext().getResources();
|
|
|
|
|
pdvTask.setValue(Metadata.KEY, ProducteevTask.METADATA_KEY);
|
|
|
|
|
pdvTask.setValue(ProducteevTask.ID, remoteTask.optLong("id_task"));
|
|
|
|
|
pdvTask.setValue(ProducteevTask.DASHBOARD_ID, remoteTask.optLong("id_dashboard"));
|
|
|
|
@ -43,9 +41,6 @@ public class ProducteevTaskContainer extends SyncContainer {
|
|
|
|
|
if (!"0".equals(repeatingValue) && repeatingValue.length() > 0 &&
|
|
|
|
|
repeatingInterval != null && repeatingInterval.length() > 0) {
|
|
|
|
|
pdvTask.setValue(ProducteevTask.REPEATING_SETTING, repeatingValue+","+repeatingInterval);
|
|
|
|
|
// "PDV "+("1".equals(repeatingValue) ?
|
|
|
|
|
// res.getString(R.string.repeat_every).replaceAll(" %d", "") :
|
|
|
|
|
// res.getString(R.string.repeat_every, Integer.parseInt(repeatingValue)))+" "+getLocalizedRepeatInterval(repeatingInterval));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -66,16 +61,5 @@ public class ProducteevTaskContainer extends SyncContainer {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// private String getLocalizedRepeatInterval(String pdvRepeatInterval) {
|
|
|
|
|
// String localizedRepeatInterval = "";
|
|
|
|
|
// if (pdvRepeatInterval.startsWith("day"))
|
|
|
|
|
// localizedRepeatInterval = res.getStringArray(R.array.repeat_interval)[0];
|
|
|
|
|
// else if (pdvRepeatInterval.equals("week") || pdvRepeatInterval.equals("weeks"))
|
|
|
|
|
// localizedRepeatInterval = res.getStringArray(R.array.repeat_interval)[1];
|
|
|
|
|
// else if (pdvRepeatInterval.startsWith("month"))
|
|
|
|
|
// localizedRepeatInterval = res.getStringArray(R.array.repeat_interval)[2];
|
|
|
|
|
// else
|
|
|
|
|
// localizedRepeatInterval = pdvRepeatInterval; // TODO: localize year and weekday in strings-producteev.xml
|
|
|
|
|
// return localizedRepeatInterval;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|