Fixed a bug with sharing when not logged in

pull/14/head
Sam Bosley 13 years ago
parent e23aee3b9b
commit 316d998306

@ -786,8 +786,11 @@ public class EditPeopleControlSet extends PopupControlSet {
/** Resume save /** Resume save
* @param data */ * @param data */
public void onActivityResult(int requestCode, int resultCode, Intent data) { public void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode == loginRequestCode && resultCode == Activity.RESULT_OK) if(requestCode == loginRequestCode && resultCode == Activity.RESULT_OK) {
task.setValue(Task.USER_ID, -2L);
task.setValue(Task.USER, "");
saveSharingSettings(saveToast); saveSharingSettings(saveToast);
}
else if (requestCode == loginRequestCode) else if (requestCode == loginRequestCode)
makePrivateTask(); makePrivateTask();
} }

@ -591,6 +591,8 @@ public class TaskListActivity extends ListActivity implements OnScrollListener,
if (!Preferences.getBoolean(R.string.p_showed_add_task_help, false)) { if (!Preferences.getBoolean(R.string.p_showed_add_task_help, false)) {
HelpInfoPopover.showPopover(TaskListActivity.this, quickAddBox, R.string.help_popover_add_task, null); HelpInfoPopover.showPopover(TaskListActivity.this, quickAddBox, R.string.help_popover_add_task, null);
Preferences.setBoolean(R.string.p_showed_add_task_help, true); Preferences.setBoolean(R.string.p_showed_add_task_help, true);
} else if (!Preferences.getBoolean(R.string.p_showed_tap_task_help, false)) {
showTaskEditHelpPopover();
} else if (Preferences.isSet(getString(R.string.p_showed_lists_help)) && } else if (Preferences.isSet(getString(R.string.p_showed_lists_help)) &&
!Preferences.getBoolean(R.string.p_showed_lists_help, false)) { !Preferences.getBoolean(R.string.p_showed_lists_help, false)) {
HelpInfoPopover.showPopover(TaskListActivity.this, findViewById(R.id.back), R.string.help_popover_lists, null); HelpInfoPopover.showPopover(TaskListActivity.this, findViewById(R.id.back), R.string.help_popover_lists, null);
@ -855,7 +857,7 @@ public class TaskListActivity extends ListActivity implements OnScrollListener,
currentCursor.moveToPosition(i); currentCursor.moveToPosition(i);
if(currentCursor.get(Task.ID) == withCustomId) { if(currentCursor.get(Task.ID) == withCustomId) {
getListView().setSelection(i); getListView().setSelection(i);
showHelpPopover(); showTaskEditHelpPopover();
return; return;
} }
} }
@ -882,13 +884,13 @@ public class TaskListActivity extends ListActivity implements OnScrollListener,
currentCursor.moveToPosition(i); currentCursor.moveToPosition(i);
if(currentCursor.get(Task.ID) == withCustomId) { if(currentCursor.get(Task.ID) == withCustomId) {
getListView().setSelection(i); getListView().setSelection(i);
showHelpPopover(); showTaskEditHelpPopover();
break; break;
} }
} }
} }
private void showHelpPopover() { private void showTaskEditHelpPopover() {
if (!Preferences.getBoolean(R.string.p_showed_tap_task_help, false)) { if (!Preferences.getBoolean(R.string.p_showed_tap_task_help, false)) {
Preferences.setBoolean(R.string.p_showed_tap_task_help, true); Preferences.setBoolean(R.string.p_showed_tap_task_help, true);
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);

Loading…
Cancel
Save