mirror of https://github.com/M66B/NetGuard.git
Disable donate button after click
This commit is contained in:
parent
e0ed06cc5f
commit
b4abb2e727
|
@ -525,6 +525,11 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
@Override
|
||||
public void onClick(View view) {
|
||||
new AsyncTask<Object, Object, Object>() {
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
btnDonate.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object doInBackground(Object... objects) {
|
||||
try {
|
||||
|
@ -553,6 +558,8 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
} catch (Throwable ex) {
|
||||
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
||||
Toast.makeText(ActivityMain.this, result.toString(), Toast.LENGTH_LONG).show();
|
||||
} finally {
|
||||
btnDonate.setEnabled(true);
|
||||
}
|
||||
}
|
||||
}.execute();
|
||||
|
|
Loading…
Reference in New Issue