From: Marius Gavrilescu Date: Thu, 15 Aug 2013 18:23:38 +0000 (+0300) Subject: Fix finish after deletion X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=cf178fb55ea7540b9feb737a9d11a79a87b8a593;p=unical.git Fix finish after deletion --- diff --git a/src/ro/ieval/unical/DeleteEventDialog.java b/src/ro/ieval/unical/DeleteEventDialog.java index 806db7e..f3e661d 100644 --- a/src/ro/ieval/unical/DeleteEventDialog.java +++ b/src/ro/ieval/unical/DeleteEventDialog.java @@ -11,7 +11,6 @@ import android.os.Bundle; @SuppressLint("ValidFragment") public final class DeleteEventDialog extends DialogFragment { private Event event; - public boolean deleted=false; @Override public Dialog onCreateDialog(final Bundle savedInstanceState) { @@ -22,7 +21,7 @@ public final class DeleteEventDialog extends DialogFragment { @Override public void onClick(final DialogInterface dialog, final int id) { event.delete(getActivity()); - deleted=true; + getActivity().finish(); } }) .setNegativeButton(R.string.no, new DialogInterface.OnClickListener() { diff --git a/src/ro/ieval/unical/DisplayEventActivity.java b/src/ro/ieval/unical/DisplayEventActivity.java index 906ed5c..79c053e 100644 --- a/src/ro/ieval/unical/DisplayEventActivity.java +++ b/src/ro/ieval/unical/DisplayEventActivity.java @@ -56,13 +56,6 @@ public class DisplayEventActivity extends Activity { description.setText(event.description); } - @Override - protected void onResume () { - super.onResume(); - if(d.deleted) - finish(); - } - @Override public boolean onCreateOptionsMenu(final Menu menu) { final MenuInflater inflater = getMenuInflater();