From 312598290bfc453e16dfccdc5e9875e8fa5d0978 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Wed, 24 Sep 2014 15:36:34 +0200 Subject: fix save button when no file is selected --- .../java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java index 8569877af..fc4c9ed75 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java @@ -158,6 +158,10 @@ public class EncryptFilesFragment extends Fragment implements EncryptActivityInt } private void encryptClicked(boolean share) { + if (mEncryptInterface.getInputUris().isEmpty()) { + Notify.showNotify(getActivity(), R.string.error_no_file_selected, Notify.Style.ERROR); + return; + } if (share) { mEncryptInterface.getOutputUris().clear(); for (Uri uri : mEncryptInterface.getInputUris()) { -- cgit v1.2.3