mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-27 06:41:15 +00:00
Do not request data when finishing
This commit is contained in:
parent
87f3ea9687
commit
ad65198f70
3 changed files with 6 additions and 6 deletions
|
@ -65,7 +65,7 @@ public class DevicesFragment extends ListFragment implements SyncthingService.On
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateList() {
|
private void updateList() {
|
||||||
if (mAdapter == null || getView() == null)
|
if (mAdapter == null || getView() == null || getActivity().isFinishing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MainActivity activity = (MainActivity) getActivity();
|
MainActivity activity = (MainActivity) getActivity();
|
||||||
|
|
|
@ -165,10 +165,10 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI
|
||||||
* Invokes status callbacks.
|
* Invokes status callbacks.
|
||||||
*/
|
*/
|
||||||
private void updateGui() {
|
private void updateGui() {
|
||||||
if (mActivity.getApi() != null) {
|
if (mActivity.getApi() == null || getActivity().isFinishing())
|
||||||
mActivity.getApi().getSystemInfo(this);
|
return;
|
||||||
mActivity.getApi().getConnections(this);
|
mActivity.getApi().getSystemInfo(this);
|
||||||
}
|
mActivity.getApi().getConnections(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class FoldersFragment extends ListFragment implements SyncthingService.On
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateList() {
|
private void updateList() {
|
||||||
if (mAdapter == null || getView() == null)
|
if (mAdapter == null || getView() == null || getActivity().isFinishing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MainActivity activity = (MainActivity) getActivity();
|
MainActivity activity = (MainActivity) getActivity();
|
||||||
|
|
Loading…
Reference in a new issue