fix save button when no file is selected

This commit is contained in:
Vincent Breitmoser 2014-09-24 15:36:34 +02:00
parent a50fe142e4
commit 312598290b
2 changed files with 5 additions and 0 deletions

View File

@ -158,6 +158,10 @@ public class EncryptFilesFragment extends Fragment implements EncryptActivityInt
} }
private void encryptClicked(boolean share) { private void encryptClicked(boolean share) {
if (mEncryptInterface.getInputUris().isEmpty()) {
Notify.showNotify(getActivity(), R.string.error_no_file_selected, Notify.Style.ERROR);
return;
}
if (share) { if (share) {
mEncryptInterface.getOutputUris().clear(); mEncryptInterface.getOutputUris().clear();
for (Uri uri : mEncryptInterface.getInputUris()) { for (Uri uri : mEncryptInterface.getInputUris()) {

View File

@ -910,6 +910,7 @@
<string name="info_no_manual_account_creation">"Do not create OpenKeychain-Accounts manually.\nFor more information, see Help."</string> <string name="info_no_manual_account_creation">"Do not create OpenKeychain-Accounts manually.\nFor more information, see Help."</string>
<string name="contact_show_key">"Show key (%s)"</string> <string name="contact_show_key">"Show key (%s)"</string>
<string name="swipe_to_update">"Swipe down to update from keyserver"</string> <string name="swipe_to_update">"Swipe down to update from keyserver"</string>
<string name="error_no_file_selected">"Select at least one file to encrypt!"</string>
<string name="error_multi_not_supported">"Saving of multiple files not supported. This is a limitation on current Android."</string> <string name="error_multi_not_supported">"Saving of multiple files not supported. This is a limitation on current Android."</string>
<!-- First Time --> <!-- First Time -->