mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
Stop refreshing after all keys have been updated
This commit is contained in:
parent
e019752a28
commit
4dec8b2b76
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user