Added confirm dialog to the "mark unvalidated events as unknown" function.
This commit is contained in:
@@ -428,8 +428,16 @@ public class LogManagerControlActivity extends AppCompatActivity {
|
||||
return true;
|
||||
case R.id.action_mark_unknown:
|
||||
Log.i(TAG,"action_mark_unknown");
|
||||
mLm.mWac.markUnverifiedEventsAsUnknown();
|
||||
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle(R.string.mark_unverified_events_unknown_dialog_title)
|
||||
.setMessage(R.string.mark_unverified_events_unknown_dialog_message)
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
mLm.mWac.markUnverifiedEventsAsUnknown();
|
||||
}})
|
||||
.setNegativeButton(android.R.string.no, null)
|
||||
.show();
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@@ -165,11 +165,13 @@ public abstract class WebApiConnection {
|
||||
markEventsAsUnknown(eventList);
|
||||
} else {
|
||||
Log.e(TAG, "markEventsAsUnknown.updateEvent.callback - eventObj is null");
|
||||
mUtil.showToast("markEventsAsUnknown.updateEvent.callback - eventObj is null");
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (JSONException e) {
|
||||
Log.e(TAG,"markEventsAsUnknown.getEvent.callback: Error editing eventObj");
|
||||
mUtil.showToast("markEventsAsUnknown.getEvent.callback: Error editing eventObj");
|
||||
}
|
||||
} else {
|
||||
mUtil.showToast("Failed to Retrieve Event from Remote Database");
|
||||
@@ -179,7 +181,7 @@ public abstract class WebApiConnection {
|
||||
});
|
||||
} else {
|
||||
Log.i(TAG,"markEventsAsUnknown(): No more events to Modify");
|
||||
mUtil.showToast("No unvalidated events to modify :)");
|
||||
mUtil.showToast("No more unvalidated events to modify.");
|
||||
|
||||
}
|
||||
return(true);
|
||||
|
||||
Reference in New Issue
Block a user