|
|
|
@ -292,22 +292,22 @@ public class RecordsActivity extends ColorfulActivity { |
|
|
|
|
// binding.spinner1.getSelectedItem().toString();
|
|
|
|
|
// filterUtils.showFilterDialog(this::updateRecyclerView);
|
|
|
|
|
// break;
|
|
|
|
|
case R.id.menu_record_clear: |
|
|
|
|
clearUtils.showClearDialog(() -> { |
|
|
|
|
ProgressDialog mProgressDialog = new ProgressDialog(this); |
|
|
|
|
mProgressDialog.setMessage(getString(R.string.deleting)); |
|
|
|
|
mProgressDialog.show(); |
|
|
|
|
ThreadPoolUtil.execute(() -> { |
|
|
|
|
IRecordsUtils recordsUtils = recordsUtilsMap.get(currentTypeFromSpinner); |
|
|
|
|
if (recordsUtils != null) { |
|
|
|
|
recordsUtils.clearInWorkerThread(filterUtils.filterParameter(), () -> { |
|
|
|
|
runOnUiThread(mProgressDialog::dismiss); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
ToastUtils.showShort(R.string.clean_over); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
// case R.id.menu_record_clear:
|
|
|
|
|
// clearUtils.showClearDialog(() -> {
|
|
|
|
|
// ProgressDialog mProgressDialog = new ProgressDialog(this);
|
|
|
|
|
// mProgressDialog.setMessage(getString(R.string.deleting));
|
|
|
|
|
// mProgressDialog.show();
|
|
|
|
|
// ThreadPoolUtil.execute(() -> {
|
|
|
|
|
// IRecordsUtils recordsUtils = recordsUtilsMap.get(currentTypeFromSpinner);
|
|
|
|
|
// if (recordsUtils != null) {
|
|
|
|
|
// recordsUtils.clearInWorkerThread(filterUtils.filterParameter(), () -> {
|
|
|
|
|
// runOnUiThread(mProgressDialog::dismiss);
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// ToastUtils.showShort(R.string.clean_over);
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
// break;
|
|
|
|
|
} |
|
|
|
|
return super.onOptionsItemSelected(item); |
|
|
|
|
} |
|
|
|
|