diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-18 14:41:24 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-18 14:41:24 +0200 |
commit | 4dec8b2b761a5135be749e557edd562463da775d (patch) | |
tree | 7e634c47601b8e3559860dc407a3c334c7b2beed /OpenKeychain/src/main/java/org/sufficientlysecure/keychain | |
parent | e019752a282cd306b2433debffcef0ae6960d895 (diff) | |
download | open-keychain-4dec8b2b761a5135be749e557edd562463da775d.tar.gz open-keychain-4dec8b2b761a5135be749e557edd562463da775d.tar.bz2 open-keychain-4dec8b2b761a5135be749e557edd562463da775d.zip |
Stop refreshing after all keys have been updated
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java | 8 |
1 files changed, 4 insertions, 4 deletions
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 ffcb1955b..4891ab63a 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java @@ -135,13 +135,14 @@ public class KeyListFragment extends LoaderFragment mSwipeRefreshLayout.setOnRefreshListener(new NoScrollableSwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { - KeyUpdateHelper updateHelper = new KeyUpdateHelper(); KeychainIntentServiceHandler finishedHandler = new KeychainIntentServiceHandler(getActivity()) { public void handleMessage(Message message) { - mSwipeRefreshLayout.setRefreshing(false); + if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) { + mSwipeRefreshLayout.setRefreshing(false); + } } }; - updateHelper.updateAllKeys(getActivity(), finishedHandler); + new KeyUpdateHelper().updateAllKeys(getActivity(), finishedHandler); updateActionbarForSwipe(false); } }); @@ -158,7 +159,6 @@ public class KeyListFragment extends LoaderFragment updateActionbarForSwipe(true); } else { updateActionbarForSwipe(false); - mSwipeRefreshLayout.setRefreshing(false); } return false; } |