1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-23 12:51:16 +00:00

Do not request data when finishing

This commit is contained in:
Lode Hoste 2015-03-24 22:43:24 +01:00
parent 87f3ea9687
commit ad65198f70
3 changed files with 6 additions and 6 deletions

View file

@ -65,7 +65,7 @@ public class DevicesFragment extends ListFragment implements SyncthingService.On
}
private void updateList() {
if (mAdapter == null || getView() == null)
if (mAdapter == null || getView() == null || getActivity().isFinishing())
return;
MainActivity activity = (MainActivity) getActivity();

View file

@ -165,11 +165,11 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI
* Invokes status callbacks.
*/
private void updateGui() {
if (mActivity.getApi() != null) {
if (mActivity.getApi() == null || getActivity().isFinishing())
return;
mActivity.getApi().getSystemInfo(this);
mActivity.getApi().getConnections(this);
}
}
/**
* Populates views with status received via {@link RestApi#getSystemInfo}.

View file

@ -65,7 +65,7 @@ public class FoldersFragment extends ListFragment implements SyncthingService.On
}
private void updateList() {
if (mAdapter == null || getView() == null)
if (mAdapter == null || getView() == null || getActivity().isFinishing())
return;
MainActivity activity = (MainActivity) getActivity();