<commit_before>package com.github.mobile.android.gist;

import static android.widget.Toast.LENGTH_LONG;
import static com.github.mobile.android.ResultCodes.GIST_DELETE;
import android.app.Activity;
import android.app.ProgressDialog;
import android.widget.Toast;

import com.github.mobile.android.R.string;
import com.google.inject.Inject;

import org.eclipse.egit.github.core.Gist;
import org.eclipse.egit.github.core.service.GistService;

import roboguice.inject.ContextScopedProvider;
import roboguice.util.RoboAsyncTask;

/**
 * Async task to delete a Gist
 */
public class DeleteGistTask extends RoboAsyncTask<Gist> {

    private final String id;

    private ProgressDialog progress;

    @Inject
    private ContextScopedProvider<GistService> serviceProvider;

    /**
     * Create task
     *
     * @param context
     * @param gistId
     */
    public DeleteGistTask(final Activity context, final String gistId) {
        super(context);
        id = gistId;
    }

    private void dismissProgress() {
        if (progress != null)
            progress.hide();
    }

    /**
     * Execute the task with a progress dialog displaying.
     * <p>
     * This method must be called from the main thread.
     */<commit_msg>Dismiss dialog instead of hiding<commit_after>package com.github.mobile.android.gist;

import static android.widget.Toast.LENGTH_LONG;
import static com.github.mobile.android.ResultCodes.GIST_DELETE;
import android.app.Activity;
import android.app.ProgressDialog;
import android.widget.Toast;

import com.github.mobile.android.R.string;
import com.google.inject.Inject;

import org.eclipse.egit.github.core.Gist;
import org.eclipse.egit.github.core.service.GistService;

import roboguice.inject.ContextScopedProvider;
import roboguice.util.RoboAsyncTask;

/**
 * Async task to delete a Gist
 */
public class DeleteGistTask extends RoboAsyncTask<Gist> {

    private final String id;

    private ProgressDialog progress;

    @Inject
    private ContextScopedProvider<GistService> serviceProvider;

    /**
     * Create task
     *
     * @param context
     * @param gistId
     */
    public DeleteGistTask(final Activity context, final String gistId) {
        super(context);
        id = gistId;
    }

    private void dismissProgress() {
        if (progress != null)
            progress.dismiss();
    }

    /**
     * Execute the task with a progress dialog displaying.
     * <p>
     * This method must be called from the main thread.
     */
{'fraction_non_alphanumeric': 0.09317269076305221, 'fraction_numerical': 0.0, 'mean_word_length': 3.214890016920474, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5107880', 'n_tokens_mistral': 743, 'n_tokens_neox': 733, 'n_words': 182}