]> iEval git - unical.git/commitdiff
Fix finish after deletion
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 15 Aug 2013 18:23:38 +0000 (21:23 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 15 Aug 2013 18:23:38 +0000 (21:23 +0300)
src/ro/ieval/unical/DeleteEventDialog.java
src/ro/ieval/unical/DisplayEventActivity.java

index 806db7e62cff69cf038d0eca76761caac24d4057..f3e661dbcf910085b128485f174a25ec5dfce0e5 100644 (file)
@@ -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() {
index 906ed5cddf77e7118f4f851469fefdbfdda71078..79c053e904a2e620c7385f31d27622468426b9dc 100644 (file)
@@ -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();
This page took 0.031994 seconds and 4 git commands to generate.