mirror of https://github.com/M66B/FairEmail.git
Show executing cleanup
This commit is contained in:
parent
bcb165db59
commit
c72e752a43
|
@ -267,11 +267,13 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|||
@Override
|
||||
protected void onPreExecute(Bundle args) {
|
||||
btnCleanup.setEnabled(false);
|
||||
ToastEx.makeText(getContext(), R.string.title_executing, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Bundle args) {
|
||||
btnCleanup.setEnabled(true);
|
||||
ToastEx.makeText(getContext(), R.string.title_setup_done, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -280,11 +282,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExecuted(Bundle args, Void data) {
|
||||
ToastEx.makeText(getContext(), R.string.title_setup_done, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getFragmentManager(), ex);
|
||||
|
|
|
@ -13,11 +13,11 @@ public class ToastEx extends Toast {
|
|||
super(context);
|
||||
}
|
||||
|
||||
public static Toast makeText(Context context, int resId, int duration) throws Resources.NotFoundException {
|
||||
public static ToastEx makeText(Context context, int resId, int duration) throws Resources.NotFoundException {
|
||||
return makeText(context, context.getText(resId), duration);
|
||||
}
|
||||
|
||||
public static Toast makeText(Context context, CharSequence text, int duration) {
|
||||
public static ToastEx makeText(Context context, CharSequence text, int duration) {
|
||||
ToastEx toast = new ToastEx(context);
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
View view = inflater.inflate(R.layout.toast, null);
|
||||
|
|
Loading…
Reference in New Issue