Fixed a bug where the save toast wouldn't show correctly for shared tasks

pull/14/head
Sam Bosley 13 years ago
parent 626c7f5c65
commit 78b5bb31c2

@ -661,17 +661,20 @@ public class EditPeopleControlSet extends PopupControlSet {
task.setValue(Task.DETAILS_DATE, 0L);
readTagData(result.getJSONArray("tags"));
JSONObject assignee = result.getJSONObject("assignee");
JSONObject assignee = result.getJSONObject("user");
JsonHelper.readUser(assignee,
task, Task.USER_ID, Task.USER);
Flags.set(Flags.ACTFM_SUPPRESS_SYNC);
taskService.save(task);
String assignedName = assignee.optString("name");
if (TextUtils.isEmpty(assignedName)) {
assignedName = assignee.optString("email");
}
long id = assignee.optLong("id", -2);
if (!(id == -2 || id == ActFmPreferenceService.userId() || assignedName == null)) {
if (!(id == -2 || id == ActFmPreferenceService.userId() || TextUtils.isEmpty(assignedName))) {
saveToast += "\n" +
activity.getString(R.string.actfm_EPA_assigned_toast, assignedName);
activity.getString(R.string.actfm_EPA_assigned_toast, assignedName, assignedName);
}
int count = result.optInt("shared", 0);

@ -60,7 +60,7 @@
android:layout_height="fill_parent"
android:background="@drawable/footer_editbutton"
android:gravity="center"
android:text="@string/FLA_new_filter"
android:text="@string/FLA_new_list"
android:textStyle="bold"
style="@style/TextAppearance.TEA_action"/>

@ -246,7 +246,10 @@
<string name="FLA_toast_onCreateShortcut">Created Shortcut: %s</string>
<!-- Menu: new filter -->
<string name="FLA_new_filter">New List</string>
<string name="FLA_new_filter">New Filter</string>
<!-- Button: new list -->
<string name="FLA_new_list">New List</string>
<!-- ================================================= TaskEditActivity == -->

Loading…
Cancel
Save