diff options
3 files changed, 11 insertions, 2 deletions
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()) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java index 6e9eed650..02397538c 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java @@ -162,6 +162,8 @@ public class KeyListFragment extends LoaderFragment return false; } }); + // Just disable for now + mSwipeRefreshLayout.setIsLocked(true); return root; } @@ -195,12 +197,14 @@ public class KeyListFragment extends LoaderFragment } } + /* @Override public void onResume() { String[] servers = Preferences.getPreferences(getActivity()).getKeyServers(); mSwipeRefreshLayout.setIsLocked(servers == null || servers.length == 0 || servers[0] == null); super.onResume(); } + */ /** * Define Adapter and Loader on create of Activity @@ -468,7 +472,7 @@ public class KeyListFragment extends LoaderFragment @Override public boolean onMenuItemActionExpand(MenuItem item) { // disable swipe-to-refresh - mSwipeRefreshLayout.setIsLocked(true); + // mSwipeRefreshLayout.setIsLocked(true); return true; } @@ -477,7 +481,7 @@ public class KeyListFragment extends LoaderFragment mQuery = null; getLoaderManager().restartLoader(0, null, KeyListFragment.this); // enable swipe-to-refresh - mSwipeRefreshLayout.setIsLocked(false); + // mSwipeRefreshLayout.setIsLocked(false); return true; } }); diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index b17196587..14d0eba9b 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -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="contact_show_key">"Show key (%s)"</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> <!-- First Time --> |