@@ -32,19 +32,15 @@ public GitAsyncTask(Activity activity, boolean finishOnEnd, boolean refreshListO
3232 }
3333
3434 protected void onPreExecute () {
35- // Toast.makeText(activity.getApplicationContext(), String.format("Running %s", operation.toString()), Toast.LENGTH_LONG).show();
36- snack = Snackbar .make (activity .findViewById (R .id .main_layout ),
37- Html .fromHtml (String .format ("<font color=\" #ffffff\" >Running the Git operation %s</font>" , operation .toString ())),
38- Snackbar .LENGTH_INDEFINITE );
39- snack .show ();
35+ Toast .makeText (activity .getApplicationContext (),
36+ Html .fromHtml (String .format ("<font color=\" #ffffff\" >Running %s</font>" , operation .getClass ().getSimpleName ())),
37+ Toast .LENGTH_LONG ).show ();
4038 }
4139
4240 protected void onProgressUpdate (String ... progress ) {
43- if (this .snack != null ) snack .dismiss ();
44- snack = Snackbar .make (activity .findViewById (R .id .main_layout ),
45- Html .fromHtml (String .format ("<font color=\" #ffffff\" >Running: <strong>%s</strong></font>" , progress [0 ])),
46- Snackbar .LENGTH_INDEFINITE );
47- snack .show ();
41+ Toast .makeText (activity .getApplicationContext (),
42+ Html .fromHtml (String .format ("<font color=\" #ffffff\" >Running jgit command: <strong>%s</strong></font>" , progress [0 ])),
43+ Toast .LENGTH_LONG ).show ();
4844 }
4945
5046 @ Override
@@ -63,7 +59,8 @@ protected String doInBackground(GitCommand... commands) {
6359 } else {
6460 command .call ();
6561 }
66- publishProgress (command .getClass ().getName ());
62+ String opName = command .getClass ().getSimpleName ();
63+ publishProgress (opName );
6764 } catch (Exception e ) {
6865 e .printStackTrace ();
6966 return e .getMessage () + "\n Caused by:\n " + e .getCause ();
@@ -73,13 +70,6 @@ protected String doInBackground(GitCommand... commands) {
7370 }
7471
7572 protected void onPostExecute (String result ) {
76- if (this .snack != null )
77- try {
78- this .snack .dismiss ();
79- } catch (Exception e ) {
80- // ignore
81- }
82-
8373 if (result == null )
8474 result = "Unexpected error" ;
8575
0 commit comments