package com.eclair.downloadnresize.helpers;

import android.content.Context;
import android.util.Log;
import android.widget.Toast;

/**
 * Created by andrewcherkashin on 4/26/15.
 */
public class DRReporter {
    final static String TAG_REPORTER = "DRReporter";

    public static void reportError(Context context, String message) {
        report(context, "Error:", message);
    }

    public static void reportServiceStatus(Context context, String status) {
        report(context, "Service:", status);
    }

    private static void report(Context context, String type, String message) {
        Toast.makeText(context, type + " " + message, Toast.LENGTH_SHORT).show();
        Log.d(TAG_REPORTER, type + " " + message);
    }
}

@@ -254,16 +254,47 @@
 porter%22;
+%0A    static Toast currentToast;
 %0A%0A    pu
@@ -624,16 +624,26 @@
         
+showToast(
 Toast.ma
@@ -703,14 +703,8 @@
 ORT)
-.show(
 );%0A 
@@ -758,11 +758,207 @@
 );%0A    %7D
+%0A%0A    private static void showToast(Toast toast) %7B%0A        if (currentToast != null) %7B%0A            currentToast.cancel();%0A        %7D%0A        currentToast = toast;%0A        currentToast.show();%0A    %7D
 %0A%7D%0A

replace currently showing toast with a new one