Added handler for FileHasNoContent exception, some clean up
This commit is contained in:
@@ -219,14 +219,21 @@ public class ImportKeysListFragment extends ListFragment implements
|
|||||||
} else {
|
} else {
|
||||||
setListShownNoAnimation(true);
|
setListShownNoAnimation(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Exception error = data.getError();
|
||||||
|
|
||||||
switch (loader.getId()) {
|
switch (loader.getId()) {
|
||||||
case LOADER_ID_BYTES:
|
case LOADER_ID_BYTES:
|
||||||
|
error = data.getError();
|
||||||
|
|
||||||
|
if(error instanceof ImportKeysListLoader.FileHasNoContent) {
|
||||||
|
AppMsg.makeText(getActivity(), R.string.error_import_file_no_content,
|
||||||
|
AppMsg.STYLE_ALERT).show();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LOADER_ID_SERVER_QUERY:
|
case LOADER_ID_SERVER_QUERY:
|
||||||
|
|
||||||
Exception error = data.getError();
|
|
||||||
|
|
||||||
if(error == null) {
|
if(error == null) {
|
||||||
AppMsg.makeText(
|
AppMsg.makeText(
|
||||||
getActivity(), getResources().getQuantityString(R.plurals.keys_found,
|
getActivity(), getResources().getQuantityString(R.plurals.keys_found,
|
||||||
|
|||||||
Reference in New Issue
Block a user