Fix save task when pressing back

Closes #23
pull/25/merge
Alex Baker 11 years ago
parent 0496b2d185
commit 4a520aebd4

@ -7,7 +7,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.tasks"
android:versionName="4.6.9"
android:versionCode="318">
android:versionCode="320">
<!-- widgets, alarms, and services will break if Astrid is installed on SD card -->
<!-- android:installLocation="internalOnly"> -->

@ -839,7 +839,11 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
public boolean onKeyDown(int keyCode) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
discardButtonClick();
if(title.getText().length() == 0) {
discardButtonClick();
} else {
saveButtonClick();
}
return true;
}
return false;

Loading…
Cancel
Save